summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-02-20 12:20:35 +0000
committerSimon McVittie <smcv@collabora.com>2018-02-21 11:19:53 +0000
commitbd75bb1687ddd2bcdfe865f3af43f892306bd8af (patch)
tree7340400ee051be3372e87fa8d740f5885aea65ba
parentc1620c153a12353ddba4084b69a83b3f5329116b (diff)
downloaddbus-bd75bb1687ddd2bcdfe865f3af43f892306bd8af.tar.gz
cmake: Check for getrlimit, setrlimit
This gives us feature parity with the Autotools build system for this particular area, and in particular means a system dbus-daemon built with cmake can expand its fd limit. Signed-off-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105165 (cherry picked from commit a146724f2f7610bc0a968d03a3f20481c03a6a37)
-rw-r--r--cmake/ConfigureChecks.cmake2
-rw-r--r--cmake/config.h.cmake2
2 files changed, 4 insertions, 0 deletions
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake
index 119b83e6..7a03ef1f 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 d2af3c96..5a757ef8 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -227,6 +227,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