[gvfs] metadata: Include headers for device number functionality
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] metadata: Include headers for device number functionality
- Date: Fri, 6 Jan 2017 15:26:27 +0000 (UTC)
commit 3424bef7ef71dc3a8c2c71310671cd6d39e7b3e7
Author: Ondrej Holy <oholy redhat com>
Date: Mon Jan 2 11:31:35 2017 +0100
metadata: Include headers for device number functionality
The implicit sys/sysmacros.h (resp. sys/mkdev.h) includes via sys/types.h
is being deprecated. Use AC_HEADER_MAJOR and include necessary header
files for major(), minor(), and makedev() functions.
https://bugzilla.gnome.org/show_bug.cgi?id=776213
configure.ac | 1 +
metadata/meta-daemon.c | 6 ++++++
metadata/metatree.c | 6 ++++++
3 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6fe62db..c4253b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -760,6 +760,7 @@ AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
dnl ==========================================================================
dnl Look for various fs info getters
+AC_HEADER_MAJOR
AC_CHECK_HEADERS([sys/statfs.h sys/statvfs.h sys/vfs.h sys/mount.h sys/param.h])
AC_CHECK_FUNCS(statvfs statfs)
AC_CHECK_MEMBERS([struct statfs.f_fstypename, struct statfs.f_bavail],,, [#include <sys/types.h>
diff --git a/metadata/meta-daemon.c b/metadata/meta-daemon.c
index 16a7219..17402df 100644
--- a/metadata/meta-daemon.c
+++ b/metadata/meta-daemon.c
@@ -36,6 +36,12 @@
#include <libudev.h>
#endif
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+
#define WRITEOUT_TIMEOUT_SECS 60
#define WRITEOUT_TIMEOUT_SECS_NFS 15
diff --git a/metadata/metatree.c b/metadata/metatree.c
index 89942cb..0ba9dba 100644
--- a/metadata/metatree.c
+++ b/metadata/metatree.c
@@ -18,6 +18,12 @@
#include "metadata-dbus.h"
#include "gvfsdaemonprotocol.h"
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+
#define MAGIC "\xda\x1ameta"
#define MAGIC_LEN 6
#define MAJOR_VERSION 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]