From 85e3bf85c67c322bff83d131f93dc9c77685e2f4 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 28 Jul 2017 21:13:41 -0700 Subject: [PATCH] src: include for major() and minor() This resolves the following deprecation warning (and other instances of the same warning) when compiling with glibc 2.25 or later: stat_test.c: In function 'cmp_statx': stat_test.c:251:13: warning: In the GNU C Library, "major" is defined by . For historical compatibility, it is currently defined by as well, but we plan to remove this soon. To use "major", include directly. If you did not intend to use a system-defined macro "major", you should undefine it after including . devcmp(dev); ^ Signed-off-by: Eric Biggers Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- src/fssum.c | 1 + src/stat_test.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/fssum.c b/src/fssum.c index 88e75621..04052cdc 100644 --- a/src/fssum.c +++ b/src/fssum.c @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef __SOLARIS__ #include #endif diff --git a/src/stat_test.c b/src/stat_test.c index fc87ed5c..198c1332 100644 --- a/src/stat_test.c +++ b/src/stat_test.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "statx.h" static bool failed = false;