diff options
author | Tobias Jungel <tobias.jungel@bisdn.de> | 2016-06-01 15:18:21 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-06-16 10:12:59 +0200 |
commit | 3694798bc58665ee89e2d9c7f7829484f288ea28 (patch) | |
tree | 2aa4b0204e0f52ddb823f75c5060c64aa33a9cdc /src/basic/macro.h | |
parent | 998c4d2d1020020695aa033199851674e8292146 (diff) |
networkd: add support to configure VLAN on bridge ports
Diffstat (limited to 'src/basic/macro.h')
-rw-r--r-- | src/basic/macro.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index e41aa4260..6b2aeb933 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -89,6 +89,15 @@ #define UNIQ_T(x, uniq) CONCATENATE(__unique_prefix_, CONCATENATE(x, uniq)) #define UNIQ __COUNTER__ +/* builtins */ +#if __SIZEOF_INT__ == 4 +#define BUILTIN_FFS_U32(x) __builtin_ffs(x); +#elif __SIZEOF_LONG__ == 4 +#define BUILTIN_FFS_U32(x) __builtin_ffsl(x); +#else +#error "neither int nor long are four bytes long?!?" +#endif + /* Rounds up */ #define ALIGN4(l) (((l) + 3) & ~3) |