summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2015-12-31 16:27:44 +0000
committerRoy Marples <roy@marples.name>2015-12-31 16:27:44 +0000
commit3eeb66d7bde9cff68cc0561bb5ba748cba84cc3d (patch)
tree3f88862dda1737b2370292e215be658c2a49787c /configure
parentad8c369e123f06d5ec6972d42816b343746f6c01 (diff)
downloaddhcpcd-3eeb66d7bde9cff68cc0561bb5ba748cba84cc3d.tar.xz
Remove FreeBSD specific defines and include the needed headers via config.h.
This allows better compile for derivatives such as kFreeBSD. For kFreeBSD, also define BSD. Fixes [1987e7b3a3].
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure b/configure
index 4989c6a6..6a03f61f 100755
--- a/configure
+++ b/configure
@@ -368,8 +368,15 @@ fi
case "$OS" in
freebsd*|kfreebsd*)
+ # FreeBSD hide some newer POSIX APIs behind _GNU_SOURCE ...
echo "CPPFLAGS+= -D_GNU_SOURCE" >>$CONFIG_MK
+ case "$OS" in
+ kfreebsd*) echo "CPPFLAGS+= -DBSD" >>$CONFIG_MK;;
+ esac
echo "DHCPCD_SRCS+= if-bsd.c" >>$CONFIG_MK
+ # Whacky includes needed to buck the trend
+ echo "#include <net/if.h>" >>$CONFIG_H
+ echo "#include <net/if_var.h>" >>$CONFIG_H
;;
linux*)
echo "CPPFLAGS+= -D_GNU_SOURCE" >>$CONFIG_MK