summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2016-05-02 12:18:47 -0700
committerMark Wielaard <mjw@redhat.com>2016-05-02 21:45:09 +0200
commitafeccd48a738ebae5645dded4dd13f053747d008 (patch)
tree3bc569a74fca75093b98cb654f379c47a490c6a2
parentf46ba1e7211f4ae884f234a37e16bc5feafa2b1c (diff)
downloadelfutils-afeccd48a738ebae5645dded4dd13f053747d008.tar.gz
config: Fix check for argp_parse to pass &argv
Right now it's passing a char* when it expects a char** instead. This usually produces a warning that may go unnoticed, but if CFLAGS contains -Werror, that breaks the ./configure run with the following error: $ ./configure CFLAGS=-Werror ... configure: WARNING: "libc does not have argp" checking for argp_parse in -largp... no configure: error: "no libargp found" Tested: Checked that after this fix, running ./configure CFLAGS=-Werror works as expected and argp_parse is correctly detected. Signed-off-by: Filipe Brandenburger <filbranden@google.com>
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 31f346f3..f2b5c8fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-05-02 Filipe Brandenburger <filbranden@google.com>
+
+ * configure.ac (argp check): Pass pass &argv.
+
2016-03-31 Mark Wielaard <mjw@redhat.com>
* configure.ac: Set version to 0.166.
diff --git a/configure.ac b/configure.ac
index 86a69c66..72cb22e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -340,7 +340,7 @@ dnl Check if we have argp available from our libc
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <argp.h>],
- [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
+ [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,&argv,0,0,0); return 0;]
)],
[libc_has_argp="true"],
[libc_has_argp="false"]