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