]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
dbus-sysdeps-util-unix.c: Avoid including sys/syslimits.h
authorAlex Richardson <arichardson@FreeBSD.org>
Tue, 9 Aug 2022 10:17:57 +0000 (10:17 +0000)
committerSimon McVittie <smcv@collabora.com>
Tue, 13 Sep 2022 11:26:36 +0000 (12:26 +0100)
This header is GCC specific header that on my system just contains
`#include_next <limits.h>`. FreeBSD also provides this header but it
contains a `#warning` that it should not be used. Replace the one use
with `#include <limit.h>` and drop the configure checks.

(cherry picked from commit a214ed824d257b5ab3ea81c8286395e65df81423)
Backported-from: dbus!280

cmake/ConfigureChecks.cmake
cmake/config.h.cmake
configure.ac
dbus/dbus-sysdeps-util-unix.c

index baa8ac21bee1964e007be634d55a87c0f23d1070..fee46e361c1016431ddda03fe8b82e142652647f 100644 (file)
@@ -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
index ed8ef66c3f71cfbf15a4bb6402e3a560c06abbe6..a69f8510623820965d5a6f71f35ed9faf13f51b3 100644 (file)
 #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
 
index 61f22dc202083ec1344c2a2fe01883ee2677c427..d105551406155113c76cb2a4519b75a66c474116 100644 (file)
@@ -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
index ca130cffd2a79da339579d36cd4fdb42e45aca06..9fe7d55f04c92d28855fa3df761f095df3781953 100644 (file)
@@ -43,6 +43,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <limits.h>
 #include <sys/stat.h>
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #include <sys/prctl.h>
 #endif
 
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
-
 #ifdef HAVE_SYSTEMD
 #include <systemd/sd-daemon.h>
 #endif