diff --git a/configure.ac b/configure.ac index 012fbd3fb..ae649b4a0 100644 --- a/configure.ac +++ b/configure.ac @@ -346,6 +346,10 @@ dnl ############################################################################ dnl OS specific stuff dnl ############################################################################ +AC_CHECK_DECLS([environ], , , + [ #include + #include ]) + case $host_os in *os400) AC_PATH_PROG([PERL], [perl], [/QOpenSys/pkgs/bin/perl]) diff --git a/lib/widget/input_complete.c b/lib/widget/input_complete.c index cd0ccbc87..4d3fd8b4b 100644 --- a/lib/widget/input_complete.c +++ b/lib/widget/input_complete.c @@ -54,8 +54,7 @@ /*** global variables ****************************************************************************/ -/* Linux declares environ in , so don't repeat it here. */ -#if (!(defined(__linux__) && defined (__USE_GNU)) && !defined(__CYGWIN__)) +#if !HAVE_DECL_ENVIRON extern char **environ; #endif