From: Roy Marples Date: Wed, 10 Sep 2014 02:22:18 +0000 (+0000) Subject: Fix arc4random_uniform test. X-Git-Tag: v6.4.4~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ffb70eff1605f7b29e9acbf5a707966dd3c8318f;p=thirdparty%2Fdhcpcd.git Fix arc4random_uniform test. Rename if-linux-wireless.c to if-linux-wext.c to better reflect it's purpose. --- diff --git a/configure b/configure index 40bd01f8..c5b14213 100755 --- 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 <_nl80211.c +#include +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 <_nl80211.c -#include -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' \ diff --git a/if-linux-wireless.c b/if-linux-wext.c similarity index 100% rename from if-linux-wireless.c rename to if-linux-wext.c diff --git a/if-linux.c b/if-linux.c index a528f06f..246f2532 100644 --- a/if-linux.c +++ b/if-linux.c @@ -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