diff options
| author | Damien George <damien@micropython.org> | 2023-06-22 11:18:01 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-06-23 15:34:22 +1000 |
| commit | 18caf49a7fab84f55fdf170eb5ca1c27206ccc76 (patch) | |
| tree | 6fb6eaeff46dbf075fefffb970278b29c4f1b1a6 | |
| parent | 402fdc40fb5ca98b3987052cc264e8344d928a69 (diff) | |
extmod/modbtree: Undefine queue macros before including berkeley-db.
To prevent warnings when building with ESP IDF v5.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | extmod/modbtree.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/extmod/modbtree.c b/extmod/modbtree.c index e9c760a38..9b2d184a1 100644 --- a/extmod/modbtree.c +++ b/extmod/modbtree.c @@ -32,6 +32,31 @@ #include <stdio.h> #include <errno.h> // for declaration of global errno variable #include <fcntl.h> + +// Undefine queue macros that will be defined in berkeley-db-1.xx headers +// below, in case they clash with system ones defined in headers above. +#undef LIST_HEAD +#undef LIST_ENTRY +#undef LIST_INIT +#undef LIST_INSERT_AFTER +#undef LIST_INSERT_HEAD +#undef LIST_REMOVE +#undef TAILQ_HEAD +#undef TAILQ_ENTRY +#undef TAILQ_INIT +#undef TAILQ_INSERT_HEAD +#undef TAILQ_INSERT_TAIL +#undef TAILQ_INSERT_AFTER +#undef TAILQ_REMOVE +#undef CIRCLEQ_HEAD +#undef CIRCLEQ_ENTRY +#undef CIRCLEQ_INIT +#undef CIRCLEQ_INSERT_AFTER +#undef CIRCLEQ_INSERT_BEFORE +#undef CIRCLEQ_INSERT_HEAD +#undef CIRCLEQ_INSERT_TAIL +#undef CIRCLEQ_REMOVE + #include <db.h> #include <../../btree/btree.h> |
