src: include <sys/sysmacros.h> for major() and minor()
authorEric Biggers <ebiggers@google.com>
Sat, 29 Jul 2017 04:13:41 +0000 (21:13 -0700)
committerEryu Guan <eguan@redhat.com>
Thu, 3 Aug 2017 12:43:57 +0000 (20:43 +0800)
commit85e3bf85c67c322bff83d131f93dc9c77685e2f4
tree211942eb3ef18297c5039e768d233717617960b4
parent14d318429ebb487965cbbbe518898e8af58bb7c0
src: include <sys/sysmacros.h> 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 <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 "major", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "major", you should undefine it after including <sys/types.h>.
  devcmp(dev);
             ^

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
src/fssum.c
src/stat_test.c