diff --git a/configure.in b/configure.in index 27cb7ada..70dc29cd 100644 --- a/configure.in +++ b/configure.in @@ -185,6 +185,7 @@ fi dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h stdarg.h inttypes.h stdint.h stddef.h poll.h unistd.h sys/epoll.h sys/time.h sys/queue.h sys/event.h sys/param.h sys/ioctl.h sys/select.h sys/devpoll.h port.h netinet/in.h netinet/in6.h sys/socket.h sys/uio.h arpa/inet.h sys/eventfd.h sys/mman.h sys/sendfile.h sys/wait.h netdb.h]) +AC_CHECK_HEADERS([sys/stat.h]) AC_CHECK_HEADERS(sys/sysctl.h, [], [], [ #ifdef HAVE_SYS_PARAM_H #include @@ -284,6 +285,7 @@ AC_HEADER_TIME dnl Checks for library functions. AC_CHECK_FUNCS([gettimeofday vasprintf fcntl clock_gettime strtok_r strsep]) AC_CHECK_FUNCS([getnameinfo strlcpy inet_ntop inet_pton signal sigaction strtoll inet_aton pipe eventfd sendfile mmap splice arc4random arc4random_buf issetugid geteuid getegid getprotobynumber setenv unsetenv putenv sysctl]) +AC_CHECK_FUNCS([umask]) AC_CACHE_CHECK( [for getaddrinfo], diff --git a/test/regress_main.c b/test/regress_main.c index 32557c1e..bbac2b41 100644 --- a/test/regress_main.c +++ b/test/regress_main.c @@ -58,6 +58,9 @@ #endif #include +#ifdef _EVENT_HAVE_SYS_STAT_H +#include +#endif #ifndef WIN32 #include @@ -123,6 +126,9 @@ regress_make_tmpfile(const void *data, size_t datalen) char tmpfilename[32]; int fd; strcpy(tmpfilename, "/tmp/eventtmp.XXXXXX"); +#ifdef _EVENT_HAVE_UMASK + umask(0077); +#endif fd = mkstemp(tmpfilename); if (fd == -1) return (-1);