diff options
Diffstat (limited to 'ext/fts5/fts5Int.h')
-rw-r--r-- | ext/fts5/fts5Int.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/fts5/fts5Int.h b/ext/fts5/fts5Int.h index 2da347862..dbab6546c 100644 --- a/ext/fts5/fts5Int.h +++ b/ext/fts5/fts5Int.h @@ -20,6 +20,7 @@ SQLITE_EXTENSION_INIT1 #include <string.h> #include <assert.h> +#include <stddef.h> #ifndef SQLITE_AMALGAMATION @@ -79,7 +80,7 @@ typedef sqlite3_uint64 u64; ** Macros needed to provide flexible arrays in a portable way */ #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 |