]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
configure: Fix test for open_memstream
authorRoy Marples <roy@marples.name>
Sun, 28 Jul 2019 11:53:03 +0000 (12:53 +0100)
committerRoy Marples <roy@marples.name>
Sun, 28 Jul 2019 11:53:03 +0000 (12:53 +0100)
glibc-2.19 needs the return value testing....

configure

index d25eec56c7ff5b4aeeccfb43e78db1068424ce2b..500585203210b2450f8ad55fccb2bac97dd060e0 100755 (executable)
--- a/configure
+++ b/configure
@@ -747,8 +747,7 @@ if [ -z "$OPEN_MEMSTREAM" ]; then
        cat <<EOF >_open_memstream.c
 #include <stdio.h>
 int main(void) {
-       open_memstream(NULL, NULL);
-       return 0;
+       return open_memstream(NULL, NULL) != NULL ? 0 : 1;
 }
 EOF
        if $XCC _open_memstream.c -o _open_memstream 2>&3; then