From: Eric Biggers Date: Sat, 29 Jul 2017 04:13:41 +0000 (-0700) Subject: src: include for major() and minor() X-Git-Tag: v2022.05.01~1933 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=85e3bf85c67c322bff83d131f93dc9c77685e2f4;p=users%2Fhch%2Fxfstests-dev.git 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 --- diff --git a/src/fssum.c b/src/fssum.c index 88e75621c..04052cdc8 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 fc87ed5c6..198c1332f 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;