summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-03-20 01:40:20 +0000
committerSimon McVittie <smcv@collabora.com>2023-05-15 19:06:54 +0000
commit4364b9ebb3acef566a2c1955423426584147226e (patch)
treeafbef4a885ef77ca7c0adcaf0e8b87912fc8f10e /cmake
parent1a74c43c0e545f41b6266713362c42748ee579e8 (diff)
downloaddbus-4364b9ebb3acef566a2c1955423426584147226e.tar.gz
Support /proc in _dbus_file_get_content
procfs has special semantics: most files are 0 size, only one read can be done on a file, and they are not larger than 4MB. Enhance _dbus_file_get_content() so that we can read files from /proc with it. Signed-off-by: Luca Boccassi <bluca@debian.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/ConfigureChecks.cmake3
-rw-r--r--cmake/config.h.cmake3
2 files changed, 6 insertions, 0 deletions
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake
index 172db213..dfa21a55 100644
--- a/cmake/ConfigureChecks.cmake
+++ b/cmake/ConfigureChecks.cmake
@@ -15,6 +15,7 @@ check_include_file(errno.h HAVE_ERRNO_H) # dbus-sysdeps.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(linux/magic.h HAVE_LINUX_MAGIC_H)
check_include_file(locale.h HAVE_LOCALE_H)
check_include_file(signal.h HAVE_SIGNAL_H)
check_include_file(stdio.h HAVE_STDIO_H) # dbus-sysdeps.h
@@ -26,6 +27,7 @@ check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H)
check_include_file(sys/syscall.h HAVE_SYS_SYSCALL_H)
check_include_file(sys/prctl.h HAVE_SYS_PRCTL_H)
check_include_file(sys/time.h HAVE_SYS_TIME_H)# dbus-sysdeps-win.c
+check_include_file(sys/vfs.h HAVE_SYS_VFS_H)
check_include_file(ws2tcpip.h HAVE_WS2TCPIP_H)# dbus-sysdeps-win.c
check_include_file(unistd.h HAVE_UNISTD_H) # dbus-sysdeps-util-win.c
check_include_file(sys/inotify.h DBUS_BUS_ENABLE_INOTIFY)
@@ -64,6 +66,7 @@ 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_symbol_exists(fstatfs "sys/vfs.h" HAVE_FSTATFS)
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 395a583d..43771b99 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -120,10 +120,12 @@
#cmakedefine HAVE_SYSLOG_H 1
#cmakedefine HAVE_SYS_EVENTS_H 1
#cmakedefine HAVE_SYS_INOTIFY_H 1
+#cmakedefine HAVE_LINUX_MAGIC_H 1
#cmakedefine HAVE_SYS_PRCTL_H 1
#cmakedefine HAVE_SYS_RANDOM_H 1
#cmakedefine HAVE_SYS_RESOURCE_H 1
#cmakedefine HAVE_SYS_SYSCALL_H 1
+#cmakedefine HAVE_SYS_VFS_H 1
/* Define to 1 if you have sys/time.h */
#cmakedefine HAVE_SYS_TIME_H 1
@@ -185,6 +187,7 @@
#cmakedefine HAVE_ACCEPT4 1
+#cmakedefine HAVE_FSTATFS 1
#cmakedefine HAVE_INOTIFY_INIT1 1
#cmakedefine HAVE_GETRANDOM 1
#cmakedefine HAVE_GETRLIMIT 1