aboutsummaryrefslogtreecommitdiffstats
path: root/debian/libosmocore-utils.dirs
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-12-06 14:37:18 +0100
committerHarald Welte <laforge@osmocom.org>2020-12-06 14:40:55 +0100
commit622cda3802be7b54075bae25839d55936a1c370a (patch)
tree01dbfa42793d70360bebf7eafb1f36edb594ea87 /debian/libosmocore-utils.dirs
parentc22e0028901fd62024f6e60da674db706c6f51c9 (diff)
hash/log2: Add generic implementations of fls() and fls64()
When importing the hashtable code in I8ef73a62fe9846ce45058eb21cf999dd3eed5741 I didn't import actual implementations of the fls() and fls64() implementations, as at least gcc-10 was smart enough to detect we only use it on constant types and hence the computation can happen at build time via const_ilog2() However, in our jenkins build verification' this doesn't appear to happen, as we get below errors: /build/deps/install/stow/libosmocore/include/osmocom/core/log2.h: In function ‘__ilog2_u32’: /build/deps/install/stow/libosmocore/include/osmocom/core/log2.h:20:9: error: implicit declaration of function ‘fls’ [-Werror=implicit-function-declaration] return fls(n) - 1; ^~~ /build/deps/install/stow/libosmocore/include/osmocom/core/log2.h: In function ‘__ilog2_u64’: /build/deps/install/stow/libosmocore/include/osmocom/core/log2.h:28:9: error: implicit declaration of function ‘fls64’ [-Werror=implicit-function-declaration] return fls64(n) - 1; ^~~~~ Let's provide some generic implementations for this case. If needed one could also introduce architecture-specific assembly implementations like in the Linux kernel, but so far we managed to keep libosmocore free of any assembly tweaks. Change-Id: Ifa4898eb66c8d949618edd47961b7a0330ed35b5
Diffstat (limited to 'debian/libosmocore-utils.dirs')
0 files changed, 0 insertions, 0 deletions