From dce6957d863500b2e9d6912353c3c9fa0dc7485a Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 23 Oct 2024 15:41:08 +0200 Subject: [PATCH] configure.ac: Fix FIONREAD check with gcc-14 on Solaris Before this fix, it would fail to build with gcc-14 with the error: conftest.c: In function 'main': conftest.c:265:11: error: implicit declaration of function 'ioctl' [-Wimplicit-function-declaration] 265 | int foo = ioctl (0, FIONREAD, &foo); | ^~~~~ Solaris documents ioctl() as being defined in . * configure.ac: Fix FIONREAD check with gcc-14 on Solaris. Ref: https://lists.gnu.org/r/emacs-devel/2024-10/msg00195.html Copyright-paperwork-exempt: yes (cherry picked from commit 5e5689a2a40cd16d7593a0c7ddea5511adc3bf22) --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 0540d18b142..c49bc0e80d6 100644 --- a/configure.ac +++ b/configure.ac @@ -7150,6 +7150,9 @@ AC_CACHE_CHECK([for usable FIONREAD], [emacs_cv_usable_FIONREAD], #ifdef USG5_4 # include #endif + #ifdef HAVE_UNISTD_H + # include /* defines ioctl() on Solaris */ + #endif ]], [[int foo = ioctl (0, FIONREAD, &foo);]])], [emacs_cv_usable_FIONREAD=yes], -- 2.39.5