]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix arc4random_uniform test.
authorRoy Marples <roy@marples.name>
Wed, 10 Sep 2014 02:22:18 +0000 (02:22 +0000)
committerRoy Marples <roy@marples.name>
Wed, 10 Sep 2014 02:22:18 +0000 (02:22 +0000)
Rename if-linux-wireless.c to if-linux-wext.c to better reflect it's purpose.

configure
if-linux-wext.c [moved from if-linux-wireless.c with 100% similarity]
if-linux.c

index 40bd01f8faa240bcf278645fb388d5c2cf9f4294..c5b14213c5a18d7a874e681c80d5b283fda34f2b 100755 (executable)
--- a/configure
+++ b/configure
@@ -419,6 +419,24 @@ fi
 XCC="$CC `$SED -n -e 's/CPPFLAGS+=*\(.*\)/\1/p' $CONFIG_MK`"
 XCC="$XCC `$SED -n -e 's/CFLAGS+=*\(.*\)/\1/p' $CONFIG_MK`"
 
+if [ "$OS" = linux ]; then
+       printf "Testing for nl80211 ... "
+       cat <<EOF >_nl80211.c
+#include <linux/nl80211.hx>
+int main(void) {
+       return 0;
+}
+EOF
+       if $XCC _nl80211.c -o _nl80211 2>/dev/null; then
+               echo "yes"
+               echo "#define HAVE_NL80211_H" >>$CONFIG_H
+       else
+               echo "no"
+               echo "DHCPCD_SRCS+=     if-linux-wext.c" >>$CONFIG_MK
+       fi
+       rm -f _nl80211.c _nl80211
+fi
+
 abort=false
 # We require the libc to support non standard functions, like getifaddrs
 printf "Testing for getifaddrs ... "
@@ -524,7 +542,7 @@ EOF
                ARC4RANDOM_UNIFORM=no
        fi
        echo "$ARC4RANDOM"
-       rm -f _arc4random.c _arc4random
+       rm -f _arc4random_uniform.c _arc4random_uniform
 fi
 if [ "$ARC4RANDOM_UNIFORM" = no ]; then
        echo "COMPAT_SRCS+=     compat/arc4random_uniform.c" >>$CONFIG_MK
@@ -1024,24 +1042,6 @@ EOF
        $abort && exit 1
 fi
 
-if [ "$OS" = linux ]; then
-       printf "Testing for nl80211 ... "
-       cat <<EOF >_nl80211.c
-#include <linux/nl80211.h>
-int main(void) {
-       return 0;
-}
-EOF
-       if $XCC _nl80211.c -o _nl80211 2>/dev/null; then
-               echo "yes"
-               echo "#define HAVE_NL80211_H" >>$CONFIG_H
-       else
-               echo "no"
-               echo "DHCPCD_SRCS+=     if-linux-wireless.c" >>$CONFIG_MK
-       fi
-       rm -f _nl80211.c _nl80211
-fi
-
 # Transform for a make file
 SERVICEEXISTS=$(echo "$SERVICEEXISTS" | $SED \
        -e 's:\\:\\\\:g' \
similarity index 100%
rename from if-linux-wireless.c
rename to if-linux-wext.c
index a528f06f62f7efe1368359acd8380972b9f20ec2..246f253296bc47d403d59d425819d245f49e88fc 100644 (file)
@@ -990,6 +990,7 @@ if_getssid(struct interface *ifp)
        r = if_getssid_wext(ifp->name, ifp->ssid);
        if (r != -1)
                ifp->ssid_len = r;
+       return r;
 }
 #endif