diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index bfb0777f0..5a0875ce7 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -2428,7 +2428,7 @@ void call_interfaces_timer() { fragments_cleanup(0); } -unsigned static int frag_key_hash(const void *A) { +static unsigned int frag_key_hash(const void *A) { const struct fragment_key *a = A; return str_hash(&a->call_id) ^ str_hash(&a->from_tag); } diff --git a/daemon/crypto.c b/daemon/crypto.c index a31b55496..e04dc8bd2 100644 --- a/daemon/crypto.c +++ b/daemon/crypto.c @@ -19,7 +19,7 @@ -GString __thread *crypto_debug_string; +__thread GString *crypto_debug_string; diff --git a/daemon/log.c b/daemon/log.c index 20e907107..8e0cac068 100644 --- a/daemon/log.c +++ b/daemon/log.c @@ -13,7 +13,7 @@ -struct log_info __thread log_info; +__thread struct log_info log_info; int _log_facility_cdr = 0; int _log_facility_rtcp = 0; diff --git a/daemon/log.h b/daemon/log.h index c519a3ad5..376d27eb7 100644 --- a/daemon/log.h +++ b/daemon/log.h @@ -36,7 +36,7 @@ extern int _log_facility_rtcp; extern int _log_facility_dtmf; -extern struct log_info __thread log_info; +extern __thread struct log_info log_info; diff --git a/daemon/media_player.c b/daemon/media_player.c index 99ff79835..1d29ac816 100644 --- a/daemon/media_player.c +++ b/daemon/media_player.c @@ -25,7 +25,7 @@ #ifdef WITH_TRANSCODING static struct timerthread media_player_thread; -static MYSQL __thread *mysql_conn; +static __thread MYSQL *mysql_conn; static void media_player_read_packet(struct media_player *mp); #endif diff --git a/include/crypto.h b/include/crypto.h index 6c849db86..cfad951e8 100644 --- a/include/crypto.h +++ b/include/crypto.h @@ -102,7 +102,7 @@ struct crypto_context { extern const struct crypto_suite *crypto_suites; extern const unsigned int num_crypto_suites; -extern GString __thread *crypto_debug_string; +extern __thread GString *crypto_debug_string; diff --git a/lib/auxlib.c b/lib/auxlib.c index 4ef076690..7387ba9a4 100644 --- a/lib/auxlib.c +++ b/lib/auxlib.c @@ -23,8 +23,8 @@ static int version; struct rtpengine_common_config *rtpe_common_config_ptr; __thread struct timeval rtpe_now; -static struct thread_buf __thread t_bufs[NUM_THREAD_BUFS]; -static int __thread t_buf_idx; +static __thread struct thread_buf t_bufs[NUM_THREAD_BUFS]; +static __thread int t_buf_idx; void daemonize(void) { diff --git a/lib/codeclib.c b/lib/codeclib.c index 0a9d5bc1e..eff7c1325 100644 --- a/lib/codeclib.c +++ b/lib/codeclib.c @@ -1590,7 +1590,7 @@ static void codeclib_key_value_parse(const str *instr, int need_value, -const static unsigned int amr_bitrates[AMR_FT_TYPES] = { +static const unsigned int amr_bitrates[AMR_FT_TYPES] = { 4750, // 0 5150, // 1 5900, // 2 @@ -1606,7 +1606,7 @@ const static unsigned int amr_bitrates[AMR_FT_TYPES] = { 0, // invalid // 12 0, // invalid // 13 }; -const static unsigned int amr_bits_per_frame[AMR_FT_TYPES] = { +static const unsigned int amr_bits_per_frame[AMR_FT_TYPES] = { 95, // 4.75 kbit/s // 0 103, // 5.15 kbit/s // 1 118, // 5.90 kbit/s // 2 @@ -1622,7 +1622,7 @@ const static unsigned int amr_bits_per_frame[AMR_FT_TYPES] = { 0, // invalid // 12 0, // invalid // 13 }; -const static unsigned int amr_wb_bitrates[AMR_FT_TYPES] = { +static const unsigned int amr_wb_bitrates[AMR_FT_TYPES] = { 6600, // 0 8850, // 1 12650, // 2 @@ -1638,7 +1638,7 @@ const static unsigned int amr_wb_bitrates[AMR_FT_TYPES] = { 0, // invalid // 12 0, // invalid // 13 }; -const static unsigned int amr_wb_bits_per_frame[AMR_FT_TYPES] = { +static const unsigned int amr_wb_bits_per_frame[AMR_FT_TYPES] = { 132, // 6.60 kbit/s // 0 177, // 8.85 kbit/s // 1 253, // 12.65 kbit/s // 2 diff --git a/recording-daemon/db.c b/recording-daemon/db.c index 49a3890f8..84a49405c 100644 --- a/recording-daemon/db.c +++ b/recording-daemon/db.c @@ -53,8 +53,8 @@ CREATE TABLE `recording_metakeys` ( -static MYSQL __thread *mysql_conn; -static MYSQL_STMT __thread +static __thread MYSQL *mysql_conn; +static __thread MYSQL_STMT *stm_insert_call, *stm_close_call, *stm_insert_stream, diff --git a/recording-daemon/recaux.c b/recording-daemon/recaux.c index 01b25405e..b24e56b1c 100644 --- a/recording-daemon/recaux.c +++ b/recording-daemon/recaux.c @@ -3,7 +3,7 @@ #include -int __thread __sscanf_hack_var; +__thread int __sscanf_hack_var; int __sscanf_match(const char *str, const char *fmt, ...) { diff --git a/recording-daemon/recaux.h b/recording-daemon/recaux.h index 6fd887cd2..876dcddd4 100644 --- a/recording-daemon/recaux.h +++ b/recording-daemon/recaux.h @@ -1,7 +1,7 @@ #ifndef _RECAUX_H_ #define _RECAUX_H_ -extern int __thread __sscanf_hack_var; +extern __thread int __sscanf_hack_var; #define sscanf_match(str, format, ...) __sscanf_match(str, format "%n", ##__VA_ARGS__, &__sscanf_hack_var) int __sscanf_match(const char *str, const char *fmt, ...) __attribute__ ((__format__ (__scanf__, 2, 3)));