diff mbox series

[08/15] xfsprogs: avoid redefinition of NBBY

Message ID 1538712196-13625-9-git-send-email-sandeen@sandeen.net (mailing list archive)
State Accepted
Headers show
Series xfsprogs: sparse fixes | expand

Commit Message

Eric Sandeen Oct. 5, 2018, 4:03 a.m. UTC
From: Eric Sandeen <sandeen@redhat.com>

sys/param.h (re)defines NBBY so just include it first.

Fixes sparse warnings about this.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
 include/platform_defs.h.in | 1 +
 1 file changed, 1 insertion(+)

Comments

Christoph Hellwig Oct. 6, 2018, 10:12 a.m. UTC | #1
On Thu, Oct 04, 2018 at 11:03:09PM -0500, Eric Sandeen wrote:
> From: Eric Sandeen <sandeen@redhat.com>
> 
> sys/param.h (re)defines NBBY so just include it first.

Include it before what?  We probably should also remove the other
definition..
Eric Sandeen Oct. 8, 2018, 2:59 p.m. UTC | #2
On 10/6/18 5:12 AM, Christoph Hellwig wrote:
> On Thu, Oct 04, 2018 at 11:03:09PM -0500, Eric Sandeen wrote:
>> From: Eric Sandeen <sandeen@redhat.com>
>>
>> sys/param.h (re)defines NBBY so just include it first.
> 
> Include it before what?  We probably should also remove the other
> definition..

We have an internal definition, maybe it was for other platforms?
Not sure.  Maybe we can just remove our local definition - it's been
there forever, not quite sure when things changed.

-Eric
diff mbox series

Patch

diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
index c4f0e8b..411a9bf 100644
--- a/include/platform_defs.h.in
+++ b/include/platform_defs.h.in
@@ -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>