mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-03 09:16:30 -04:00
Do not use sysctl.h on linux (it had been deprecated)
It had been deprecated for a long time (AFAIK), but since glibc-2.29.9000-309-g744e829637 it produces a #warning (cherry picked from commit b9b9f19058dc04b7ad4d079a38f6b86c0e7b1072)
This commit is contained in:
parent
e35e02e680
commit
d2871a37bf
@ -434,7 +434,9 @@ CHECK_INCLUDE_FILE(mach/mach_time.h EVENT__HAVE_MACH_MACH_TIME_H)
|
||||
CHECK_INCLUDE_FILE(netinet/tcp.h EVENT__HAVE_NETINET_TCP_H)
|
||||
CHECK_INCLUDE_FILE(sys/wait.h EVENT__HAVE_SYS_WAIT_H)
|
||||
CHECK_INCLUDE_FILE(sys/resource.h EVENT__HAVE_SYS_RESOURCE_H)
|
||||
CHECK_INCLUDE_FILE(sys/sysctl.h EVENT__HAVE_SYS_SYSCTL_H)
|
||||
if (NOT "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
CHECK_INCLUDE_FILE(sys/sysctl.h EVENT__HAVE_SYS_SYSCTL_H)
|
||||
endif()
|
||||
CHECK_INCLUDE_FILE(sys/timerfd.h EVENT__HAVE_SYS_TIMERFD_H)
|
||||
CHECK_INCLUDE_FILE(errno.h EVENT__HAVE_ERRNO_H)
|
||||
|
||||
|
14
configure.ac
14
configure.ac
@ -252,11 +252,15 @@ AC_CHECK_HEADERS([ \
|
||||
errno.h \
|
||||
])
|
||||
|
||||
AC_CHECK_HEADERS(sys/sysctl.h, [], [], [
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
])
|
||||
case "${host_os}" in
|
||||
linux*) ;;
|
||||
*)
|
||||
AC_CHECK_HEADERS(sys/sysctl.h, [], [], [
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
])
|
||||
esac
|
||||
|
||||
if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
|
||||
AC_MSG_CHECKING(for TAILQ_FOREACH in sys/queue.h)
|
||||
|
Loading…
x
Reference in New Issue
Block a user