mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-03 21:48:24 +02:00
Add cmake support for DBUS_HAVE_LINUX_EPOLL
Reviewed-by: Simon McVittie <smcv@collabora.com> Bug: https://gitlab.freedesktop.org/dbus/dbus/merge_requests/18
This commit is contained in:
parent
9455d3542a
commit
2934dedd1c
3 changed files with 20 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ include(CheckIncludeFiles)
|
|||
include(CheckSymbolExists)
|
||||
include(CheckStructMember)
|
||||
include(CheckTypeSize)
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
check_include_file(alloca.h HAVE_ALLOCA_H)
|
||||
check_include_file(byteswap.h HAVE_BYTESWAP_H)
|
||||
|
|
@ -69,6 +70,15 @@ check_symbol_exists(setrlimit "sys/resource.h;sys/time.h" HAVE_SETRLIMIT)
|
|||
|
||||
check_struct_member(cmsgcred cmcred_pid "sys/types.h;sys/socket.h" HAVE_CMSGCRED) # dbus-sysdeps.c
|
||||
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
#ifndef __linux__
|
||||
#error This is not Linux
|
||||
#endif
|
||||
#include <sys/epoll.h>
|
||||
int main() {
|
||||
epoll_create1 (EPOLL_CLOEXEC);
|
||||
}" DBUS_HAVE_LINUX_EPOLL)
|
||||
|
||||
# missing:
|
||||
# DBUS_HAVE_GCC33_GCOV
|
||||
|
||||
|
|
|
|||
|
|
@ -217,6 +217,9 @@
|
|||
#cmakedefine HAVE_SETRLIMIT 1
|
||||
#cmakedefine HAVE_UNIX_FD_PASSING 1
|
||||
|
||||
/* Define to use epoll(4) on Linux */
|
||||
#cmakedefine DBUS_HAVE_LINUX_EPOLL 1
|
||||
|
||||
// structs
|
||||
/* Define to 1 if you have struct cmsgred */
|
||||
#cmakedefine HAVE_CMSGCRED 1
|
||||
|
|
|
|||
|
|
@ -233,6 +233,13 @@ else (WIN32)
|
|||
)
|
||||
endif (WIN32)
|
||||
|
||||
if(DBUS_HAVE_LINUX_EPOLL)
|
||||
set(DBUS_UTIL_SOURCES
|
||||
${DBUS_UTIL_SOURCES}
|
||||
${DBUS_DIR}/dbus-socket-set-epoll.c
|
||||
)
|
||||
endif()
|
||||
|
||||
set(libdbus_SOURCES
|
||||
${DBUS_LIB_SOURCES}
|
||||
${DBUS_SHARED_SOURCES}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue