Commit: Fix compile time warnings in conftest.c files

Message ID 874juopmb0.fsf@redhat.com
State Repeat Merge
Headers
Series Commit: Fix compile time warnings in conftest.c files |

Checks

Context Check Description
snail/binutils-gdb-check warning Git am fail log

Commit Message

Nick Clifton Nov. 24, 2022, 12:30 p.m. UTC
  Hi Guys,

  I am applying the patch below to fix a potential compile time warning
  message when gas's configure script runs.

  In addition I have also imported Florian Weimer's patch to the
  libiberty sources (885b6660c17f) which does the same thing there.

  Together these two patches mean that the configure scripts run without
  generating compile time warning messages from modern versions of gcc.

Cheers
  Nick
  

Patch

diff --git a/gas/acinclude.m4 b/gas/acinclude.m4
index 9864abe23eb..bf6dba6825f 100644
--- a/gas/acinclude.m4
+++ b/gas/acinclude.m4
@@ -23,6 +23,7 @@  AC_DEFUN([GAS_WORKING_ASSERT],
 [AC_MSG_CHECKING([for working assert macro])
 AC_CACHE_VAL(gas_cv_assert_ok,
 AC_TRY_LINK([#include <assert.h>
+#include <string.h>
 #include <stdio.h>], [
 /* check for requoting problems */
 static int a, b, c, d;
diff --git a/gas/configure b/gas/configure
index d9800f8a53d..57c1fa3557e 100755
--- a/gas/configure
+++ b/gas/configure
@@ -13791,6 +13791,7 @@  else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <assert.h>
+#include <string.h>
 #include <stdio.h>
 int
 main ()