]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
rbtree: Fix building from a DragonFlyBSD import
authorRoy Marples <roy@marples.name>
Wed, 28 Aug 2019 12:55:02 +0000 (13:55 +0100)
committerRoy Marples <roy@marples.name>
Wed, 28 Aug 2019 12:55:02 +0000 (13:55 +0100)
compat/rb.c
compat/rbtree.h
configure

index ed643e7b22792142bfd65386cca3a0b23d79e9a9..e5fcaf6d7f184a26b2fa4293a680251cf106dfd1 100644 (file)
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "common.h"
+#include "config.h"
 
 #if !defined(_KERNEL) && !defined(_STANDALONE)
 #include <sys/types.h>
index b0944a9817f6b5c9cd415c20bd09ab70f0502016..9d1b629f9df798c703ec23c794e29558b48ee192 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef _SYS_RBTREE_H_
 #define        _SYS_RBTREE_H_
 
-#include "common.h"
+#include "config.h"
 
 #if defined(_KERNEL) || defined(_STANDALONE)
 #include <sys/types.h>
 #include <stdbool.h>
 #include <inttypes.h>
 #endif
+#ifdef HAVE_SYS_QUEUE_H
+#include <sys/queue.h>
+#else
 #include "queue.h"
+#endif
 #if !defined(__linux__) && !defined(__QNX__) && !defined(__sun)
 #include <sys/endian.h>
 #else
index b05b0241d049b0c604f1bde5867fc04bfd6b03dc..a42e99dbe736b89088d56365b044cdf0a658196b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1038,7 +1038,7 @@ EOF
        rm -f _rbtree.c _rbtree
 fi
 if [ "$RBTREE" = no ]; then
-       echo "CPPFLAGS+=        -DRBTEST" >>$CONFIG_MK
+       echo "#define   RBTEST" >>$CONFIG_H
        echo "COMPAT_SRCS+=     compat/rb.c" >>$CONFIG_MK
        echo "#include                  \"compat/rbtree.h\"" >>$CONFIG_H
 else