]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: avoid redefinition of NBBY
authorEric Sandeen <sandeen@redhat.com>
Wed, 17 Oct 2018 18:25:10 +0000 (13:25 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 17 Oct 2018 18:25:10 +0000 (13:25 -0500)
Include sys/param.h for NBBY definition.  Do this before our local
guarded definition which is for platforms like android that don't have it,
see commit:

c9a90185 xfsprogs: define NBBY if not defined by the system header files

Fixes sparse warnings about this redefinition.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/platform_defs.h.in

index c4f0e8b46e2d063d42827427bfaa9c53ea3f6ccf..d111ec6d2d37a84ee7dde48ac25869110379b8f5 100644 (file)
@@ -19,6 +19,7 @@
 #include <pthread.h>
 #include <ctype.h>
 #include <sys/types.h>
+#include <sys/param.h>
 #include <limits.h>
 #include <stdbool.h>
 #include <libgen.h>
@@ -65,6 +66,7 @@ typedef unsigned short umode_t;
 #define max(a,b)       (((a)>(b))?(a):(b))
 #endif
 
+/* If param.h doesn't provide it, i.e. for Android */
 #ifndef NBBY
 #define NBBY 8
 #endif