diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-06-10 13:04:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-10 13:04:44 +0200 |
commit | 1edce01965b4da12dbf4363e77b62471ac664fa1 (patch) | |
tree | 1b29b266256021a846cae7ffb2b6f05253f1ea93 /src/basic/macro.h | |
parent | fec2b09791d851ac8c29d8f1e26d76717b59f33b (diff) | |
parent | 13b498f967c5117a88d72304bed1f8c0b9c1bb87 (diff) |
Merge pull request #3428 from toanju/networkd/brvlan
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 e41aa4260f..6b2aeb933f 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) |