summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e5ec046)
raw | patch | inline | side by side (parent: e5ec046)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Thu, 11 Aug 2016 15:44:42 +0000 (17:44 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Thu, 11 Aug 2016 15:44:42 +0000 (17:44 +0200) |
md.c: In function ‘md_process’:
md.c:120:3: warning: ‘__makedev_from_sys_types’ is deprecated:
In the GNU C Library, `makedev' is defined by <sys/sysmacros.h>.
For historical compatibility, it is currently defined by
<sys/types.h> as well, but we plan to remove this soon.
To use `makedev', include <sys/sysmacros.h> directly.
If you did not intend to use a system-defined macro `makedev',
you should #undef it after including <sys/types.h>.
[-Wdeprecated-declarations]
if (st.st_rdev != makedev (MD_MAJOR, minor))
^~
In file included from /usr/include/features.h:397:0,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from ./daemon/collectd.h:34,
from md.c:22:
md.c:120:3: warning: ‘__makedev_from_sys_types’ is deprecated:
In the GNU C Library, `makedev' is defined by <sys/sysmacros.h>.
For historical compatibility, it is currently defined by
<sys/types.h> as well, but we plan to remove this soon.
To use `makedev', include <sys/sysmacros.h> directly.
If you did not intend to use a system-defined macro `makedev',
you should #undef it after including <sys/types.h>.
[-Wdeprecated-declarations]
if (st.st_rdev != makedev (MD_MAJOR, minor))
^~
In file included from /usr/include/features.h:397:0,
from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdio.h:28,
from ./daemon/collectd.h:34,
from md.c:22:
configure.ac | patch | blob | history | |
src/md.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index b78dd11bf5ce77841ec17cfd2436fce6d8c9c89b..6cd3599d3bda297f21bfae5f9399855caa6ee060 100644 (file)
--- a/configure.ac
+++ b/configure.ac
#include <linux/major.h>
#include <linux/types.h>
])
+ AC_CHECK_HEADERS([sys/sysmacros.h])
else
have_linux_raid_md_u_h="no"
fi
diff --git a/src/md.c b/src/md.c
index 3725f9a9b78fc2c10fcd676b529c9a9e2df3144d..b34cc975be70343c9d96cc96b28d10157a59a1c4 100644 (file)
--- a/src/md.c
+++ b/src/md.c
#include <linux/major.h>
#include <linux/raid/md_u.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
+
#define PROC_DISKSTATS "/proc/diskstats"
#define DEV_DIR "/dev"