Only include <alloca.h> if available

This commit is contained in:
Pierre Pronchery 2017-04-16 23:11:11 +02:00
parent 192812ef51
commit 91da7e10c1
2 changed files with 4 additions and 2 deletions

View File

@ -68,7 +68,7 @@ AC_CHECK_FUNCS(getopt_long)
AC_CHECK_HEADERS(unistd.h inttypes.h stdint.h endian.h libc.h)
AC_CHECK_HEADERS(windows.h winsock2.h process.h)
AC_CHECK_HEADERS(malloc.h dlfcn.h regex.h sys/cdefs.h sys/socket.h)
AC_CHECK_HEADERS(alloca.h malloc.h dlfcn.h regex.h sys/cdefs.h sys/socket.h)
AC_CHECK_HEADERS(netinet/in.h arpa/inet.h sys/uio.h aio.h)
AC_CHECK_HEADERS(sys/mman.h sys/wait.h sys/resource.h sys/time.h)
AC_CHECK_HEADERS(io.h mach/task.h)

View File

@ -49,7 +49,9 @@
#include <errno.h>
#include <signal.h>
#include <libgen.h>
#include <alloca.h>
#if defined HAVE_ALLOCA_H
# include <alloca.h>
#endif
#if defined HAVE_SYS_TIME_H
# include <sys/time.h>
#endif