From 3a657c600bde2d3bd84870f75968622bbdb69ce8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 5 Jan 2020 09:50:27 +0400 Subject: libctf: Add configure check for asprintf (for MinGW) This commit fixes a compilation warning when compiling libctf on MinGW: libctf/ctf-dump.c:118:8: warning: implicit declaration of function 'asprintf'; did you mean 'vasprintf'? [-Wimplicit-function-declaration] if (asprintf (&bit, " %lx: [slice 0x%x:0x%x]", ^~~~~~~~ vasprintf MinGW doesn't provide that function, so we depend on the one provided by libiberty. However, the declaration is guarded by HAVE_DECL_ASPRINTF, which we do not have in libctf's config.h. libctf/ChangeLog: PR binutils/25155: * configure.ac: Add AC_CHECK_DECLS([asprintf]). * configure, config.h.in: Regenerate. --- libctf/configure.ac | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libctf/configure.ac') diff --git a/libctf/configure.ac b/libctf/configure.ac index c53cf017e11..7f2a713b93d 100644 --- a/libctf/configure.ac +++ b/libctf/configure.ac @@ -99,6 +99,8 @@ AC_C_BIGENDIAN AC_CHECK_HEADERS(byteswap.h endian.h) AC_CHECK_FUNCS(pread) +AC_CHECK_DECLS([asprintf]) + dnl Check for qsort_r. (Taken from gnulib.) AC_CHECK_FUNCS_ONCE([qsort_r]) if test $ac_cv_func_qsort_r = yes; then -- cgit v1.2.1