Skip to content

Commit

Permalink
add NOGLOBALVARS def
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Oct 31, 2023
1 parent 128cbb0 commit 012bf26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions toxcore/Messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 4 additions & 0 deletions toxcore/friend_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 012bf26

Please sign in to comment.