From 8d0b7258dd4e4e850183ec8c73c67e4dc86464a8 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Thu, 11 Aug 2016 17:44:42 +0200 Subject: [PATCH] md: fix deprecation warning with latest glibc MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 . For historical compatibility, it is currently defined by as well, but we plan to remove this soon. To use `makedev', include directly. If you did not intend to use a system-defined macro `makedev', you should #undef it after including . [-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 | 1 + src/md.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index b78dd11b..6cd3599d 100644 --- a/configure.ac +++ b/configure.ac @@ -418,6 +418,7 @@ then #include #include ]) + 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 3725f9a9..b34cc975 100644 --- a/src/md.c +++ b/src/md.c @@ -29,6 +29,10 @@ #include #include +#ifdef HAVE_SYS_SYSMACROS_H +#include +#endif + #define PROC_DISKSTATS "/proc/diskstats" #define DEV_DIR "/dev" -- 2.11.0