diff options
author | rim <rozhuk.im@gmail.com> | 2019-09-13 15:58:55 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-04-21 11:02:14 +0100 |
commit | 54c62040b2881f2b1b3d392c2d0f132f4719d031 (patch) | |
tree | 84a56c92cd6861b5df95fe904a577b23656e897e /cmake | |
parent | a6154cb8ef3ca043a7991c98a7aa66654d8c3985 (diff) | |
download | dbus-54c62040b2881f2b1b3d392c2d0f132f4719d031.tar.gz |
Use closefrom() to not loop over all possible file descriptors
Resolves: https://gitlab.freedesktop.org/dbus/dbus/-/issues/278
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/ConfigureChecks.cmake | 1 | ||||
-rw-r--r-- | cmake/config.h.cmake | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 98f27db7..78b0fa95 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -52,6 +52,7 @@ check_symbol_exists(getpwnam_r "errno.h;pwd.h" HAVE_GETPWNAM_R) # check_symbol_exists(setenv "stdlib.h" HAVE_SETENV) # dbus-sysdeps.c check_symbol_exists(unsetenv "stdlib.h" HAVE_UNSETENV) # dbus-sysdeps.c check_symbol_exists(clearenv "stdlib.h" HAVE_CLEARENV) # dbus-sysdeps.c +check_symbol_exists(closefrom "unistd.h" HAVE_CLOSEFROM) # dbus-sysdeps-unix.c check_symbol_exists(writev "sys/uio.h" HAVE_WRITEV) # dbus-sysdeps.c, dbus-sysdeps-win.c check_symbol_exists(setrlimit "sys/resource.h" HAVE_SETRLIMIT) # dbus-sysdeps.c, dbus-sysdeps-win.c, test/test-segfault.c check_symbol_exists(socketpair "sys/socket.h" HAVE_SOCKETPAIR) # dbus-sysdeps.c diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index 06bb34fd..48c5db43 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -201,6 +201,9 @@ /* Define to 1 if you have clearenv */ #cmakedefine HAVE_CLEARENV 1 +/* Define to 1 if you have closefrom */ +#cmakedefine HAVE_CLOSEFROM 1 + /* Define to 1 if you have writev */ #cmakedefine HAVE_WRITEV 1 |