[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] configure.ac: Fix FIONREAD check to work with gcc-14 on Sola
From: |
Eli Zaretskii |
Subject: |
Re: [PATCH] configure.ac: Fix FIONREAD check to work with gcc-14 on Solaris |
Date: |
Sat, 12 Oct 2024 17:28:25 +0300 |
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Sat, 12 Oct 2024 08:20:52 -0500
> Cc: Ali Bahrami <Ali.Bahrami@oracle.com>, Eli Zaretskii <eliz@gnu.org>
>
> Alan Coopersmith <alan.coopersmith@oracle.com> writes:
>
> > 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 <unistd.h>
> > ---
> > configure.ac | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 8a5ba7db3d1..947c2827b8e 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -7117,6 +7117,9 @@ AC_DEFUN
> > #ifdef USG5_4
> > # include <sys/filio.h>
> > #endif
> > + #ifdef HAVE_UNISTD_H
> > + # include <unistd.h> /* defines ioctl() on Solaris
> > */
> > + #endif
> > ]],
> > [[int foo = ioctl (0, FIONREAD, &foo);]])],
> > [emacs_cv_usable_FIONREAD=yes],
> > --
> > 2.45.2
>
> I guess this should be installed on emacs-30. Eli, WDYT?
I'd prefer on master. Who knows what addition of unistd.h could cause
to this test?