]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile on Alpine linux
authorRoy Marples <roy@marples.name>
Fri, 31 Oct 2025 08:18:55 +0000 (08:18 +0000)
committerRoy Marples <roy@marples.name>
Fri, 31 Oct 2025 08:18:55 +0000 (08:18 +0000)
compat/closefrom.c
configure
src/dev/Makefile
src/if-linux-wext.c

index 7161573e76b57d8ea63d0fa7ac6311fa9b8e9834..a11247bb5fb44f4b43ea34b5eba64ae511f46a56 100644 (file)
@@ -27,6 +27,7 @@
 #endif
 
 #include <fcntl.h>
+#include <limits.h>
 #include <unistd.h>
 
 #if defined(__linux__) && defined(SYS_close_range)
index 66024f16f665b6297460ad6f51e28185207a0846..e9c08f18027c63702b1e85efebcb40976271ff63 100755 (executable)
--- 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
index 178a0c0bad477b503373f28d45cc3165a85421e6..26e2e60d213d53cc2cf28453dd835f1c76993d8f 100644 (file)
@@ -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}
index fb1f5a8ae01a29237156ca93c396bc63e64704f7..f395fc89745fccf461175b18c96d0d757bc2ee90 100644 (file)
@@ -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));