From: Roy Marples Date: Fri, 31 Oct 2025 08:18:55 +0000 (+0000) Subject: Fix compile on Alpine linux X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e1b036ad25e55af0ebb5f4973525cf81080aec9;p=thirdparty%2Fdhcpcd.git Fix compile on Alpine linux --- diff --git a/compat/closefrom.c b/compat/closefrom.c index 7161573e..a11247bb 100644 --- a/compat/closefrom.c +++ b/compat/closefrom.c @@ -27,6 +27,7 @@ #endif #include +#include #include #if defined(__linux__) && defined(SYS_close_range) diff --git a/configure b/configure index 66024f16..e9c08f18 100755 --- a/configure +++ b/configure @@ -1218,7 +1218,6 @@ EOF rm -f _rbtree.c _rbtree fi if [ "$RBTREE" = no ]; then - echo "RBTREE_CPPFLAGS= -DRBLOCAL" >>$CONFIG_MK echo "VENDOR_SRCS+= vendor/rbtree.c" >>$CONFIG_MK # Tell rbtree.c to #include "rbtree.h" rather than sys/rbtree.h echo "RBTREE_CPPFLAGS+= -DRBLOCAL" >>$CONFIG_MK diff --git a/src/dev/Makefile b/src/dev/Makefile index 178a0c0b..26e2e60d 100644 --- a/src/dev/Makefile +++ b/src/dev/Makefile @@ -5,7 +5,7 @@ include ${TOP}/config.mk CFLAGS?= -O2 CSTD?= c99 CFLAGS+= -std=${CSTD} -CPPFLAGS+= -I${TOP} -I${TOP}/src +CPPFLAGS+= -I${TOP} -I${TOP}/src -I${TOP}/vendor DEVDIR= ${LIBDIR}/dhcpcd/dev DSRC= ${DEV_PLUGINS:=.c} diff --git a/src/if-linux-wext.c b/src/if-linux-wext.c index fb1f5a8a..f395fc89 100644 --- a/src/if-linux-wext.c +++ b/src/if-linux-wext.c @@ -69,7 +69,7 @@ if_getssid_wext(const char *ifname, uint8_t *ssid) int s, retval; struct iwreq iwr; - if ((s = xsocket(PF_INET, SOCK_DGRAM, 0)) == -1) + if ((s = socket(PF_INET, SOCK_DGRAM, 0)) == -1) return -1; memset(&iwr, 0, sizeof(iwr)); strlcpy(iwr.ifr_name, ifname, sizeof(iwr.ifr_name));