From bf86d71f58f83f53e740d64e649884c91ee77c26 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Mon, 5 Mar 2018 13:26:44 +0100 Subject: features: define osmo_bts_*_feature() as static inline The functions osmo_bts_set_feature() and osmo_bts_has_feature() are currently defined as inline. Since inline is a hinting, the compiler might choose not to inline the function. This eventually leads to linker problems because the function is then defined multiple times. - use "static inline" instead of "inline" only. This patch is a follow up patch to Change Id 680acae725b2b8dda2f239ff20073306fdfb3f6e Change-Id: Iddd97415a17b06b69f69ddca2e2e296eb2f23a89 --- include/osmocom/gsm/bts_features.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/osmocom/gsm/bts_features.h b/include/osmocom/gsm/bts_features.h index f9b0142f..e84f95b6 100644 --- a/include/osmocom/gsm/bts_features.h +++ b/include/osmocom/gsm/bts_features.h @@ -30,13 +30,13 @@ extern const struct value_string osmo_bts_features_descs[]; const char *osmo_bts_feature_name(enum osmo_bts_features feature); -inline int osmo_bts_set_feature(struct bitvec *features, enum osmo_bts_features feature) +static inline int osmo_bts_set_feature(struct bitvec *features, enum osmo_bts_features feature) { OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES); return bitvec_set_bit_pos(features, feature, 1); } -inline bool osmo_bts_has_feature(const struct bitvec *features, enum osmo_bts_features feature) +static inline bool osmo_bts_has_feature(const struct bitvec *features, enum osmo_bts_features feature) { OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES); return bitvec_get_bit_pos(features, feature); -- cgit v1.2.3