From: Roy Marples Date: Sat, 18 Jul 2009 11:31:56 +0000 (+0000) Subject: Test for getifaddrs support. X-Git-Tag: v5.1.0~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4d060d86df8be419d6f03fda2de3b0950b31297;p=thirdparty%2Fdhcpcd.git Test for getifaddrs support. --- diff --git a/configure b/configure index b3a24238..b6ac9395 100755 --- a/configure +++ b/configure @@ -120,6 +120,24 @@ if [ -e "$LDELF" ]; then echo "LDFLAGS+= -Wl,-dynamic-linker=$LDELF" >>$CONFIG_MK fi +# We require the libc to support non standard functions, like getifaddrs +printf "Testing for getifaddrs support ... " +cat <_getifaddrs.c +#include +#include +int main(void) { + struct ifaddrs *ifap; + return getifaddrs(&ifap); +} +EOF +if $CC _getifaddrs.c -o _getifaddrs 2>/dev/null; then + echo "yes" +else + echo "no" + echo "libc support for getifaddrs is required - aborting" >&2 + exit 1 +fi + printf "Testing for arc4random support ... " cat <_arc4random.c #include