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>
This commit is contained in:
Damien George 2023-06-22 11:18:01 +10:00
parent 402fdc40fb
commit 18caf49a7f

View File

@ -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>