aboutsummaryrefslogtreecommitdiff
path: root/ext/rtree/rtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/rtree/rtree.c')
-rw-r--r--ext/rtree/rtree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c
index f90fd5a0a..f7d3bda01 100644
--- a/ext/rtree/rtree.c
+++ b/ext/rtree/rtree.c
@@ -64,6 +64,8 @@
#endif
int sqlite3GetToken(const unsigned char*,int*); /* In the SQLite core */
+#include <stddef.h>
+
/*
** If building separately, we will need some setup that is normally
** found in sqliteInt.h
@@ -95,7 +97,7 @@ typedef unsigned int u32;
# define NEVER(X) (X)
#endif
#ifndef offsetof
-#define offsetof(STRUCTURE,FIELD) ((size_t)((char*)&((STRUCTURE*)0)->FIELD))
+# define offsetof(ST,M) ((size_t)((char*)&((ST*)0)->M - (char*)0))
#endif
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
# define FLEXARRAY