]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix reallocarray test
authorRoy Marples <roy@marples.name>
Wed, 4 May 2016 11:39:37 +0000 (11:39 +0000)
committerRoy Marples <roy@marples.name>
Wed, 4 May 2016 11:39:37 +0000 (11:39 +0000)
configure

index a58335ad6d7de3ab2587e748fdc222ce020c6bd0..457ff08244771bfd3662bc5ee0f3c100f4a9b2d6 100755 (executable)
--- a/configure
+++ b/configure
@@ -902,8 +902,8 @@ if [ -z "$REALLOCARRAY" ]; then
 #include <stdlib.h>
 
 int main(void) {
-       reallocarray(NULL, 0, 0);
-       return 0;
+       void *foo = reallocarray(NULL, 0, 0);
+       return foo == NULL ? 1 : 0;
 }
 EOF
        if $XCC _reallocarray.c -o _reallocarray 2>&3; then