public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-10449] libsanitizer: Avoid implicit function declaration in configure test
@ 2023-01-04 13:37 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2023-01-04 13:37 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d9490634ae2a4aa8a744f31113bbf3757c950746

commit r11-10449-gd9490634ae2a4aa8a744f31113bbf3757c950746
Author: Florian Weimer <fweimer@redhat.com>
Date:   Wed Jan 4 11:13:17 2023 +0100

    libsanitizer: Avoid implicit function declaration in configure test
    
    libsanitizer/
    
            * configure.ac (sanitizer_supported): Include <unistd.h> for
            syscall prototype.
            * configure: Regenerate.
    
    (cherry picked from commit 6be2672e4ee41c566a9e072088cccca263bab5f7)

Diff:
---
 libsanitizer/configure    | 1 +
 libsanitizer/configure.ac | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libsanitizer/configure b/libsanitizer/configure
index 1d9ae59be67..8bdde896fe7 100755
--- a/libsanitizer/configure
+++ b/libsanitizer/configure
@@ -16035,6 +16035,7 @@ case "$target" in
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+#include <unistd.h>
 int
 main ()
 {
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac
index 13cd302030d..ac24b4b593b 100644
--- a/libsanitizer/configure.ac
+++ b/libsanitizer/configure.ac
@@ -161,7 +161,8 @@ case "$target" in
   *-*-linux*)
     # Some old Linux distributions miss required syscalls.
     sanitizer_supported=no
-    AC_TRY_COMPILE([#include <sys/syscall.h>],[
+    AC_TRY_COMPILE([#include <sys/syscall.h>
+#include <unistd.h>],[
       syscall (__NR_gettid);
       syscall (__NR_futex);
       syscall (__NR_exit_group);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-04 13:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04 13:37 [gcc r11-10449] libsanitizer: Avoid implicit function declaration in configure test Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).