summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-05-02 16:23:54 +0200
committerDavid Sterba <dsterba@suse.com>2017-05-02 16:23:54 +0200
commitb75c0720a41b95e0a2e37aa3bc5591454ded65b8 (patch)
tree0381f33a0177e16ab5b78140e041292826be9eb8 /tests
parentfd4526fe686421b8844089ed058167d0724a36c0 (diff)
btrfs-progs: fssum: fix warning, include correct header for major()
tests/fssum.c:599: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>. sum_add_u64(&cs, major(st.st_rdev)); Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/fssum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/fssum.c b/tests/fssum.c
index 8be44547..5dde9984 100644
--- a/tests/fssum.c
+++ b/tests/fssum.c
@@ -24,6 +24,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <errno.h>
+#include <sys/sysmacros.h>
#include <sys/stat.h>
#include <assert.h>
#include <time.h>