diff mbox series

common: Provide the BIT() macro locally

Message ID 20200225160832.22768-1-andrew.shadura@collabora.co.uk
State Accepted
Headers show
Series common: Provide the BIT() macro locally | expand

Commit Message

Andrej Shadura Feb. 25, 2020, 4:08 p.m. UTC
wpa_ctrl.h can be installed separately with libwpa_client, so
utils/common.h won’t be available to its users.

Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
---
 src/common/wpa_ctrl.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jouni Malinen Feb. 28, 2020, 4:42 p.m. UTC | #1
On Tue, Feb 25, 2020 at 05:08:32PM +0100, Andrej Shadura wrote:
> wpa_ctrl.h can be installed separately with libwpa_client, so
> utils/common.h won’t be available to its users.

Thanks, applied.
diff mbox series

Patch

diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
index b24ae63..b60859f 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
@@ -375,6 +375,10 @@  extern "C" {
 #define WDS_STA_INTERFACE_ADDED "WDS-STA-INTERFACE-ADDED "
 #define WDS_STA_INTERFACE_REMOVED "WDS-STA-INTERFACE-REMOVED "
 
+#ifndef BIT
+#define BIT(x) (1U << (x))
+#endif
+
 /* BSS command information masks */
 
 #define WPA_BSS_MASK_ALL		0xFFFDFFFF