summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extmod/modbtree.c25
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>