aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2025-03-15 18:26:27 +0000
committerdrh <>2025-03-15 18:26:27 +0000
commit7bd72d4abf8e4659966bf6e61b32f07ee800c34a (patch)
treec2af43dd180eebb9703f4e8d3f38172775050a3f /src
parent8c0e9227219a6276de19b8944a3d41e37994aa0d (diff)
downloadsqlite-7bd72d4abf8e4659966bf6e61b32f07ee800c34a.tar.gz
sqlite-7bd72d4abf8e4659966bf6e61b32f07ee800c34a.zip
Fix alignment problems on Linux with -m32 and on Mac PPC.
FossilOrigin-Name: 8a91aeca60548d5cd19add128cf65b9c3815c9103b1ef8ff6bc02711b6d709de
Diffstat (limited to 'src')
-rw-r--r--src/vdbeInt.h3
-rw-r--r--src/whereInt.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/vdbeInt.h b/src/vdbeInt.h
index 600d9b8bc..13262cd4e 100644
--- a/src/vdbeInt.h
+++ b/src/vdbeInt.h
@@ -143,7 +143,8 @@ struct VdbeCursor {
** or less. The value of SZ_VDBECURSOR(n) is guaranteed to be a multiple
** of 8.
*/
-#define SZ_VDBECURSOR(N) (offsetof(VdbeCursor,aType) + ((N)+1)*sizeof(u64))
+#define SZ_VDBECURSOR(N) \
+ (ROUND8(offsetof(VdbeCursor,aType)) + ((N)+1)*sizeof(u64))
/* Return true if P is a null-only cursor
*/
diff --git a/src/whereInt.h b/src/whereInt.h
index 1b0a02d8b..40a720ab9 100644
--- a/src/whereInt.h
+++ b/src/whereInt.h
@@ -507,7 +507,7 @@ struct WhereInfo {
/*
** The size (in bytes) of a WhereInfo object that holds N WhereLevels.
*/
-#define SZ_WHEREINFO(N) (offsetof(WhereInfo,a)+(N)*sizeof(WhereLevel))
+#define SZ_WHEREINFO(N) ROUND8(offsetof(WhereInfo,a)+(N)*sizeof(WhereLevel))
/*
** Private interfaces - callable only by other where.c routines.