From: Simon McVittie Date: Wed, 2 Mar 2022 13:08:46 +0000 (+0000) Subject: sysdeps: Include if available X-Git-Tag: dbus-1.15.0~72^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3076161777f81128408bd512e3b369797dbd948;p=thirdparty%2Fdbus.git sysdeps: Include if available This lets us use CLOSE_RANGE_CLOEXEC whenever the kernel headers support it, even if glibc doesn't include this header via unistd.h yet. Signed-off-by: Simon McVittie --- diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index f2ca64c71..735a4fe0f 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -17,6 +17,7 @@ check_include_file(expat.h HAVE_EXPAT_H) check_include_file(grp.h HAVE_GRP_H) # dbus-sysdeps-util-win.c check_include_file(inttypes.h HAVE_INTTYPES_H) # dbus-pipe.h check_include_file(io.h HAVE_IO_H) # internal +check_include_file(linux/close_range.h HAVE_LINUX_CLOSE_RANGE_H) check_include_file(locale.h HAVE_LOCALE_H) check_include_file(memory.h HAVE_MEMORY_H) check_include_file(signal.h HAVE_SIGNAL_H) diff --git a/configure.ac b/configure.ac index afe21813f..eed8a7875 100644 --- a/configure.ac +++ b/configure.ac @@ -420,6 +420,7 @@ byteswap.h crt_externs.h dirent.h errno.h +linux/close_range.h locale.h signal.h stdint.h diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index c3dd0b83e..ced32063d 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -63,6 +63,9 @@ #ifdef HAVE_ERRNO_H #include #endif +#ifdef HAVE_LINUX_CLOSE_RANGE_H +#include +#endif #ifdef HAVE_SYSLOG_H #include #endif