File tree Expand file tree Collapse file tree 4 files changed +22
-1
lines changed
Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -1218,7 +1218,7 @@ EOF
12181218 rm -f _rbtree.c _rbtree
12191219fi
12201220if [ " $RBTREE " = no ]; then
1221- echo " #define RBLOCAL " >> $CONFIG_H
1221+ echo " RBTREE_CPPFLAGS= -DRBLOCAL " >> $CONFIG_MK
12221222 echo " VENDOR_SRCS+= vendor/rbtree.c" >> $CONFIG_MK
12231223else
12241224 echo " #define HAVE_SYS_RBTREE_H" >> $CONFIG_H
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ all: ${TOP}/config.h ${PROG} ${SCRIPTS} ${MAN5} ${MAN8}
5555dev :
5656 cd dev && ${MAKE}
5757
58+ ../vendor/rbtree.o :
59+ ${CC} ${CFLAGS} ${CPPFLAGS} ${RBTREE_CFLAGS} ${RBTREE_CPPFLAGS} -c $< -o $@
60+
5861.c.o :
5962 ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
6063
Original file line number Diff line number Diff line change 3232#include <stdbool.h>
3333
3434#include "dhcpcd.h"
35+ #include "queue.h"
3536
3637#if !defined(CTL_FREE_LIST )
3738#define CTL_FREE_LIST 1
Original file line number Diff line number Diff line change 1+ /*
2+ * This stub exists becuase we know a modern BSD supports all TAILQ
3+ * and glibc, musl et all, don't.
4+ */
5+ #if (defined(__unix__ ) || defined(unix )) && !defined(USG )
6+ #include <sys/param.h>
7+ #endif
8+ #ifdef BSD
9+ #include <sys/queue.h>
10+ /* Dragonfly BSD needs this :( */
11+ #if !defined(TAILQ_FOREACH_SAFE ) && defined(TAILQ_FOREACH_MUTABLE )
12+ #define TAILQ_FOREACH_SAFE TAILQ_FOREACH_MUTABLE
13+ #endif
14+ #else
15+ #error
16+ #include "../vendor/queue.h"
17+ #endif
You can’t perform that action at this time.
0 commit comments