From 6a5e212b39ccdb36bcdba9fe6e2cf67647447722 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 9 Aug 2022 10:17:57 +0000 Subject: [PATCH] dbus-sysdeps-util-unix.c: Avoid including sys/syslimits.h This header is GCC specific header that on my system just contains `#include_next `. FreeBSD also provides this header but it contains a `#warning` that it should not be used. Replace the one use with `#include ` and drop the configure checks. (cherry picked from commit a214ed824d257b5ab3ea81c8286395e65df81423) Backported-from: dbus!280 --- cmake/ConfigureChecks.cmake | 1 - cmake/config.h.cmake | 3 --- configure.ac | 1 - dbus/dbus-sysdeps-util-unix.c | 5 +---- 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index baa8ac21..fee46e36 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -34,7 +34,6 @@ check_include_file(sys/stat.h HAVE_SYS_STAT_H) check_include_file(sys/types.h HAVE_SYS_TYPES_H) check_include_file(sys/uio.h HAVE_SYS_UIO_H) check_include_file(sys/prctl.h HAVE_SYS_PRCTL_H) -check_include_file(sys/syslimits.h HAVE_SYS_SYSLIMITS_H) # dbus-sysdeps-unix.c check_include_file(sys/time.h HAVE_SYS_TIME_H)# dbus-sysdeps-win.c check_include_file(sys/wait.h HAVE_SYS_WAIT_H)# dbus-sysdeps-win.c check_include_file(time.h HAVE_TIME_H) # dbus-sysdeps-win.c diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index ed8ef66c..a69f8510 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -151,9 +151,6 @@ #cmakedefine HAVE_SYS_RESOURCE_H 1 #cmakedefine HAVE_SYS_STAT_H 1 -/* Define to 1 if you have sys/syslimits.h */ -#cmakedefine HAVE_SYS_SYSLIMITS_H 1 - /* Define to 1 if you have sys/time.h */ #cmakedefine HAVE_SYS_TIME_H 1 diff --git a/configure.ac b/configure.ac index 61f22dc2..d1055514 100644 --- a/configure.ac +++ b/configure.ac @@ -424,7 +424,6 @@ stdint.h sys/prctl.h sys/random.h sys/resource.h -sys/syslimits.h sys/time.h unistd.h ws2tcpip.h diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c index ca130cff..9fe7d55f 100644 --- a/dbus/dbus-sysdeps-util-unix.c +++ b/dbus/dbus-sysdeps-util-unix.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #ifdef HAVE_SYS_RESOURCE_H #include @@ -56,10 +57,6 @@ #include #endif -#ifdef HAVE_SYS_SYSLIMITS_H -#include -#endif - #ifdef HAVE_SYSTEMD #include #endif