diff options
author | Harald Welte <laforge@osmocom.org> | 2020-12-06 15:45:11 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-12-06 15:45:52 +0100 |
commit | 7fc88b324869536a0cdaf7cfde9739cf1b0b3655 (patch) | |
tree | 6fc9eb751d4d1e0ccdefc2440c0d90e265465a38 /include/osmocom/core | |
parent | c172d9fe8d2609c3e7dc3739a877403d232e73bd (diff) |
log2.h: Avoid redefining __always_inline
/build/deps/install/stow/libosmocore/include/osmocom/core/log2.h:10:0: error: "__always_inline" redefined [-Werror]
#define __always_inline inline __attribute__((always_inline))
/usr/include/x86_64-linux-gnu/sys/cdefs.h:311:0: note: this is the location of the previous definition
# define __always_inline __inline __attribute__ ((__always_inline__))
Change-Id: I738d2a72f835a29e30b8ba20456e5c4c9aa844c9
Diffstat (limited to 'include/osmocom/core')
-rw-r--r-- | include/osmocom/core/log2.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/osmocom/core/log2.h b/include/osmocom/core/log2.h index 035ce86e..8c65768f 100644 --- a/include/osmocom/core/log2.h +++ b/include/osmocom/core/log2.h @@ -7,7 +7,6 @@ #pragma once #include <stdint.h> -#define __always_inline inline __attribute__((always_inline)) /* from linux/asm-generic/bitops/{fls,fls64}.h - could later be enhanced * with architecture specific optimized versions */ @@ -19,7 +18,7 @@ * This is defined the same way as ffs. * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. */ -static __always_inline int fls(unsigned int x) +static inline __attribute__((always_inline)) int fls(unsigned int x) { int r = 32; @@ -59,7 +58,7 @@ static __always_inline int fls(unsigned int x) * set bit if value is nonzero. The last (most significant) bit is * at position 64. */ -static __always_inline int fls64(uint64_t x) +static inline __attribute__((always_inline)) int fls64(uint64_t x) { uint32_t h = x >> 32; if (h) |