There can be issues on 32-bit architectures to mmap 2+GiB file, and to
make this portable between different version of glibc, mmap64 was
prefered over _FILE_OFFSET_BITS
unsetenv
setrlimit
gethostbyname_r
+ mmap64
)
if (APPLE)
list(APPEND SYMBOLS_TO_CHECK mach_absolute_time)
offset_leftover = offset % page_size;
offset_rounded = offset - offset_leftover;
}
+#if defined(EVENT__HAVE_MMAP64)
+ mapped = mmap64(NULL, length + offset_leftover,
+#else
mapped = mmap(NULL, length + offset_leftover,
+#endif
PROT_READ,
#ifdef MAP_NOCACHE
MAP_NOCACHE | /* ??? */
AC_C_INLINE
dnl Checks for library functions.
-AC_CHECK_FUNCS([accept4 arc4random arc4random_buf arc4random_addrandom eventfd epoll_create1 fcntl getegid geteuid getifaddrs gettimeofday issetugid mach_absolute_time mmap nanosleep pipe pipe2 putenv sendfile setenv setrlimit sigaction signal strsignal strlcpy strsep strtok_r strtoll sysctl timerfd_create umask unsetenv usleep getrandom ])
+AC_CHECK_FUNCS([accept4 arc4random arc4random_buf arc4random_addrandom eventfd epoll_create1 fcntl getegid geteuid getifaddrs gettimeofday issetugid mach_absolute_time mmap nanosleep pipe pipe2 putenv sendfile setenv setrlimit sigaction signal strsignal strlcpy strsep strtok_r strtoll sysctl timerfd_create umask unsetenv usleep getrandom mmap64])
AS_IF([test "$bwin32" = "true"],
AC_CHECK_FUNCS(_gmtime64_s, , [AC_CHECK_FUNCS(_gmtime64)])
/* Define to 1 if you have the `mmap' function. */
#cmakedefine EVENT__HAVE_MMAP 1
+/* Define to 1 if you have the `mmap64' function. */
+#cmakedefine EVENT__HAVE_MMAP64 1
+
/* Define to 1 if you have the `nanosleep' function. */
#cmakedefine EVENT__HAVE_NANOSLEEP 1