diff -Naur gcc-4.9.2-orig/libiberty/aclocal.m4 gcc-4.9.2/libiberty/aclocal.m4 --- gcc-4.9.2-orig/libiberty/aclocal.m4 2011-12-20 11:08:30.000000000 +0300 +++ gcc-4.9.2/libiberty/aclocal.m4 2014-11-04 00:37:02.428600000 +0300 @@ -15,6 +15,8 @@ /* Test by Jim Wilson and Kaveh Ghazi. Check whether strncmp reads past the end of its string parameters. */ #include +#include +#include #ifdef HAVE_FCNTL_H #include @@ -147,7 +149,9 @@ fi AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, -[AC_TRY_RUN([find_stack_direction () +[AC_TRY_RUN([ +#include +find_stack_direction () { static char *addr = 0; auto char dummy; diff -Naur gcc-4.9.2-orig/libiberty/configure gcc-4.9.2/libiberty/configure --- gcc-4.9.2-orig/libiberty/configure 2014-01-06 21:15:31.000000000 +0300 +++ gcc-4.9.2/libiberty/configure 2014-11-04 00:37:02.444200000 +0300 @@ -6077,6 +6077,7 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include find_stack_direction () { static char *addr = 0; @@ -6846,6 +6847,8 @@ /* Test by Jim Wilson and Kaveh Ghazi. Check whether strncmp reads past the end of its string parameters. */ #include +#include +#include #ifdef HAVE_FCNTL_H #include