public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-9025] libsanitizer: Avoid implicit function declaration in configure test
Date: Wed,  4 Jan 2023 12:52:55 +0000 (GMT)	[thread overview]
Message-ID: <20230104125255.953443858D1E@sourceware.org> (raw)

https://gcc.gnu.org/g:7d7146102365f708a37401c902fce2f4024b546a

commit r12-9025-g7d7146102365f708a37401c902fce2f4024b546a
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 771b135573a..ae8c1bd7e83 100755
--- a/libsanitizer/configure
+++ b/libsanitizer/configure
@@ -16028,6 +16028,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 7f1ef3979c4..ad49f29db7e 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);

                 reply	other threads:[~2023-01-04 12:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230104125255.953443858D1E@sourceware.org \
    --to=fw@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).