Blob Blame History Raw
From f5b74b966c942feb95a8ddbb7d130540b15b796d Mon Sep 17 00:00:00 2001
Message-Id: <f5b74b966c942feb95a8ddbb7d130540b15b796d.1515144438.git.davide.caratti@gmail.com>
From: Beniamino Galvani <bgalvani@redhat.com>
Date: Mon, 30 Oct 2017 11:14:40 +0100
Subject: [PATCH] common: Avoid conflict with __bitwise macro from
 linux/types.h

Undefine the __bitwise macro before defining it to avoid conflicts
with the one from linux/types.h; the same is done some lines above
when __CHECKER__ is defined. Fixes the following warning:

  In file included from ../src/l2_packet/l2_packet_linux.c:15:0:
  hostap/src/utils/common.h:438:0: warning: "__bitwise" redefined
   #define __bitwise

  In file included from /usr/include/linux/filter.h:9:0,
                   from ../src/l2_packet/l2_packet_linux.c:13:
  /usr/include/linux/types.h:21:0: note: this is the location of the previous definition
   #define __bitwise __bitwise__

Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
---
 src/utils/common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/utils/common.h b/src/utils/common.h
index 46e96a65b..fec7f6013 100644
--- a/src/utils/common.h
+++ b/src/utils/common.h
@@ -435,6 +435,7 @@ void perror(const char *s);
 #define __bitwise __attribute__((bitwise))
 #else
 #define __force
+#undef __bitwise
 #define __bitwise
 #endif
 
-- 
2.13.6