From b1616cd9f39566f2274537a95f9a0fe14be50765 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 20 Feb 2018 12:20:35 +0000 Subject: [PATCH 2/3] cmake: Check for getrlimit, setrlimit This gives us feature parity with the Autotools build system. Signed-off-by: Simon McVittie --- cmake/ConfigureChecks.cmake | 2 ++ cmake/config.h.cmake | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index d83810a7..9a12bbbd 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -62,6 +62,8 @@ check_symbol_exists(inotify_init1 "sys/inotify.h" HAVE_INOTIFY_INIT1) check_symbol_exists(SCM_RIGHTS "sys/types.h;sys/socket.h;sys/un.h" HAVE_UNIX_FD_PASSING) check_symbol_exists(prctl "sys/prctl.h" HAVE_PRCTL) check_symbol_exists(raise "signal.h" HAVE_RAISE) +check_symbol_exists(getrlimit "sys/resource.h;sys/time.h" HAVE_GETRLIMIT) +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 diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index efba76d1..e487acdf 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -206,6 +206,8 @@ #cmakedefine HAVE_ACCEPT4 1 #cmakedefine HAVE_DIRFD 1 #cmakedefine HAVE_INOTIFY_INIT1 1 +#cmakedefine HAVE_GETRLIMIT 1 +#cmakedefine HAVE_SETRLIMIT 1 #cmakedefine HAVE_UNIX_FD_PASSING 1 // structs -- 2.16.1