diff --git a/extmod/modbtree.c b/extmod/modbtree.c index e9c760a389..9b2d184a1e 100644 --- a/extmod/modbtree.c +++ b/extmod/modbtree.c @@ -32,6 +32,31 @@ #include #include // for declaration of global errno variable #include + +// 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 #include <../../btree/btree.h>