diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index be3e36de41..1a4a7e4369 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -44,8 +44,13 @@ * someone wanted not to include tox.h here */ +#ifdef NOGLOBALVARS +static bool global_force_udp_only_mode = false; +static bool global_onion_active = true; +#else extern bool global_force_udp_only_mode; extern bool global_onion_active; +#endif static_assert(MAX_CONCURRENT_FILE_PIPES <= UINT8_MAX + 1, "uint8_t cannot represent all file transfer numbers"); diff --git a/toxcore/friend_connection.c b/toxcore/friend_connection.c index 3c14bdcca8..258a806bac 100644 --- a/toxcore/friend_connection.c +++ b/toxcore/friend_connection.c @@ -17,7 +17,11 @@ #define PORTS_PER_DISCOVERY 10 +#ifdef NOGLOBALVARS +static bool global_force_udp_only_mode = false; +#else extern bool global_force_udp_only_mode; +#endif typedef struct Friend_Conn_Callbacks { fc_status_cb *status_callback;