> On 2 Feb 2023, at 05:46, Sam James <s...@gentoo.org> wrote: > > dup2 requires a <unistd.h> include. Fixes the following when diffing > config.log > when testing with a stricter compiler: > ``` > -warning: call to undeclared function 'dup2'; ISO C99 and later do not > support implicit function declarations [-Wimplicit-function-declaration] > +error: call to undeclared function 'dup2'; ISO C99 and later do not support > implicit function declarations [-Wimplicit-function-declaration] > ``` > --- > aclocal.m4 | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/aclocal.m4 b/aclocal.m4 > index cc97bd4b..25e20fc2 100644 > --- a/aclocal.m4 > +++ b/aclocal.m4 > @@ -238,6 +238,9 @@ AC_CACHE_VAL(bash_cv_dup2_broken, > #include <sys/types.h> > #include <fcntl.h> > #include <stdlib.h> > +#ifdef HAVE_UNISTD_H > +#include <unistd.h> > +#endif > int > main() > { > -- > 2.39.1 > >
ping - this should be trivial and fixes some real issues Gentoo and Fedora have hit when doing modern C porting (https://wiki.gentoo.org/wiki/Modern_C_porting, https://fedoraproject.org/wiki/Changes/PortingToModernC). Best, sam
signature.asc
Description: Message signed with OpenPGP