diff options
author | David Robillard <d@drobilla.net> | 2021-09-10 23:42:10 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-09-10 23:42:10 -0400 |
commit | 22e3aafdb0fba36caa4dd0465a108276eed6914b (patch) | |
tree | e476dfa652e4f9f2c6fff3a26f0b99fd264bb6f5 | |
parent | 74bf19033f51761ad02b6bb9928fbf75dc08744c (diff) | |
download | zix-22e3aafdb0fba36caa4dd0465a108276eed6914b.tar.gz zix-22e3aafdb0fba36caa4dd0465a108276eed6914b.tar.bz2 zix-22e3aafdb0fba36caa4dd0465a108276eed6914b.zip |
Fix C11 build
-rw-r--r-- | src/btree.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/btree.c b/src/btree.c index cdb50fa..d824c23 100644 --- a/src/btree.c +++ b/src/btree.c @@ -48,9 +48,12 @@ struct ZixBTreeNodeImpl { } data; }; -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112l) || \ - (defined(__cplusplus) && __cplusplus >= 201103L) -static_assert(sizeof(ZixBTreeNode) == ZIX_BTREE_PAGE_SIZE, ""); +#if ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112l) || \ + (defined(__cplusplus) && __cplusplus >= 201103L)) +static_assert(sizeof(ZixBTreeNode) <= ZIX_BTREE_PAGE_SIZE, ""); +static_assert(sizeof(ZixBTreeNode) >= + ZIX_BTREE_PAGE_SIZE - 2u * sizeof(ZixBTreeNode*), + ""); #endif static ZixBTreeNode* |