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>
master
David Sterba 2017-05-02 16:23:54 +02:00
parent fd4526fe68
commit b75c0720a4
1 changed files with 1 additions and 0 deletions

View File

@ -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>