Browse Source

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>
pull/11876/head
Damien George 1 year ago
parent
commit
18caf49a7f
  1. 25
      extmod/modbtree.c

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

Loading…
Cancel
Save