aboutsummaryrefslogtreecommitdiff
path: root/ext/rtree/rtree.c
diff options
context:
space:
mode:
authordrh <>2025-05-30 15:43:04 +0000
committerdrh <>2025-05-30 15:43:04 +0000
commit8ae57fab64aa1e16596763b9d9435aa1f7e9933d (patch)
tree08f48e7b32ea63b4a1884af32452e5be6c222e2f /ext/rtree/rtree.c
parentb65326f51a2c8c9fcb5331cde36d55aa7d209a27 (diff)
downloadsqlite-8ae57fab64aa1e16596763b9d9435aa1f7e9933d.tar.gz
sqlite-8ae57fab64aa1e16596763b9d9435aa1f7e9933d.zip
Use a more robust backup definition for offsetof().
FossilOrigin-Name: 22441955e03df07903b98832a60c05c53721cd67c667f6c83d5e97fcc62735ee
Diffstat (limited to 'ext/rtree/rtree.c')
-rw-r--r--ext/rtree/rtree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c
index d8567b65a..f7d3bda01 100644
--- a/ext/rtree/rtree.c
+++ b/ext/rtree/rtree.c
@@ -97,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