summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/types.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/types.h b/src/include/types.h
index ca4571777c..df5e7ae06d 100644
--- a/src/include/types.h
+++ b/src/include/types.h
@@ -21,6 +21,15 @@
#define BIT(x) (1ul << (x))
#endif
+/*
+ * This macro declares a bit as a 32-bits unsigned integer. The common BIT_32(x)
+ * macro is already used by some external header file. To avoid any conflicts, we
+ * use a different name.
+ */
+#ifndef BIT_FLAG_32
+#define BIT_FLAG_32(x) (1u << (x))
+#endif
+
#define BITS_PER_BYTE 8
#endif /* __TYPES_H */