summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2022-05-25 22:00:08 +0000
committerSimon McVittie <smcv@collabora.com>2022-09-13 12:47:29 +0100
commita817ff39d256133b12a9ef0bad6f736b2124148a (patch)
treeb40e0320ddd2e36dc1b39e190c2dff42b058c364
parente1d2cd286b31d206fe3ac434fbf7c84f5138de94 (diff)
downloaddbus-a817ff39d256133b12a9ef0bad6f736b2124148a.tar.gz
cmake: Check for setresuid and getresuid
This was not being checked, so the codepaths using the define were never included. (cherry picked from commit dafb5ddc09767e22d1a8848e05b756b03226dd3f)
-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 fee46e36..e3a91711 100644
--- a/cmake/ConfigureChecks.cmake
+++ b/cmake/ConfigureChecks.cmake
@@ -75,6 +75,8 @@ check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF)
check_symbol_exists(MSG_NOSIGNAL "sys/socket.h" HAVE_DECL_MSG_NOSIGNAL)
check_symbol_exists(environ "unistd.h" HAVE_DECL_ENVIRON)
check_symbol_exists(LOG_PERROR "syslog.h" HAVE_DECL_LOG_PERROR)
+check_symbol_exists(setresuid "unistd.h" HAVE_SETRESUID)
+check_symbol_exists(getresuid "unistd.h" HAVE_GETRESUID)
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 a69f8510..fa42023f 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -247,6 +247,8 @@
#cmakedefine HAVE_VASPRINTF 1
#cmakedefine HAVE_VSNPRINTF 1
+#cmakedefine HAVE_SETRESUID 1
+#cmakedefine HAVE_GETRESUID 1
/* whether -export-dynamic was passed to libtool */
#cmakedefine DBUS_BUILT_R_DYNAMIC 1