diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 40df52ba..4846beeb 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -30,18 +30,19 @@ jobs: - os: windows-latest c_compiler: cl cpp_compiler: cl - - os: windows-latest - c_compiler: gcc - cpp_compiler: g++ - - os: windows-latest - c_compiler: clang - cpp_compiler: clang++ - os: ubuntu-latest c_compiler: gcc cpp_compiler: g++ - os: ubuntu-latest c_compiler: clang cpp_compiler: clang++ + exclude: + - os: windows-latest + c_compiler: gcc + - os: windows-latest + c_compiler: clang + - os: ubuntu-latest + c_compiler: cl steps: - uses: actions/checkout@v3 diff --git a/tunnels/adapters/tcp_listener/tcp_listener.c b/tunnels/adapters/tcp_listener/tcp_listener.c index 923f133a..45a15984 100644 --- a/tunnels/adapters/tcp_listener/tcp_listener.c +++ b/tunnels/adapters/tcp_listener/tcp_listener.c @@ -410,9 +410,9 @@ tunnel_t *newTcpListener(node_instance_context_t *instance_info) dynamic_value_t dy_mb = parseDynamicStrValueFromJsonObject(settings, "multiport-backend", 2, "iptables", "socket"); if (dy_mb.status == 2) - multiport_backend == multiport_backend_iptables; + multiport_backend = multiport_backend_iptables; if (dy_mb.status == 3) - multiport_backend == multiport_backend_sockets; + multiport_backend = multiport_backend_sockets; } else { diff --git a/tunnels/client/reverse/types.h b/tunnels/client/reverse/types.h index 2112038c..c99da7db 100644 --- a/tunnels/client/reverse/types.h +++ b/tunnels/client/reverse/types.h @@ -21,9 +21,9 @@ typedef struct reverse_client_con_state_s typedef struct reverse_client_state_s { - _Atomic unsigned int reverse_cons; - _Atomic unsigned int unused_cons; - _Atomic unsigned int round_index; + atomic_uint reverse_cons; + atomic_uint unused_cons; + atomic_uint round_index; size_t chain_index_pi; size_t connection_per_thread; diff --git a/tunnels/server/reverse/types.h b/tunnels/server/reverse/types.h index b285d1cf..b231a04a 100644 --- a/tunnels/server/reverse/types.h +++ b/tunnels/server/reverse/types.h @@ -29,8 +29,8 @@ typedef struct thread_box_s typedef struct reverse_server_state_s { - _Atomic size_t u_available; - _Atomic size_t d_available; + atomic_size_t u_available; + atomic_size_t d_available; size_t chain_index_u; size_t chain_index_d; diff --git a/ww/basic_types.h b/ww/basic_types.h index e1407e25..a5afd450 100644 --- a/ww/basic_types.h +++ b/ww/basic_types.h @@ -10,24 +10,24 @@ typedef uint64_t hash_t; typedef struct ud_s { - _Atomic uint64_t u; - _Atomic uint64_t d; + atomic_ullong u; + atomic_ullong d; } ud_t; typedef union { ud_t max; - _Atomic uint64_t max_total; + atomic_ullong max_total; } traffic_limit_t; typedef struct user_limit_s { traffic_limit_t traffic; ud_t bandwidth; - _Atomic uint64_t ip; - _Atomic uint64_t devices; - _Atomic uint64_t cons_in; - _Atomic uint64_t cons_out; + atomic_ullong ip; + atomic_ullong devices; + atomic_ullong cons_in; + atomic_ullong cons_out; } user_limit_t; typedef struct user_time_info_s @@ -35,17 +35,17 @@ typedef struct user_time_info_s datetime_t create_date; datetime_t first_usage_date; datetime_t expire_date; - _Atomic bool since_first_use; + atomic_bool since_first_use; } user_time_info_t; typedef struct user_stat_s { ud_t speed; ud_t traffic; - _Atomic uint64_t ips; - _Atomic uint64_t devices; - _Atomic uint64_t cons_in; - _Atomic uint64_t cons_out; + atomic_ullong ips; + atomic_ullong devices; + atomic_ullong cons_in; + atomic_ullong cons_out; } user_stat_t; @@ -61,7 +61,7 @@ typedef struct user_s int gid; // group id hash_t hash_uid; - _Atomic bool enable; + atomic_bool enable; user_limit_t limit; user_time_info_t timeinfo; user_stat_t stats; diff --git a/ww/buffer_pool.h b/ww/buffer_pool.h index 2f53bafb..7f90104d 100644 --- a/ww/buffer_pool.h +++ b/ww/buffer_pool.h @@ -10,7 +10,7 @@ typedef struct buffer_pool_s shift_buffer_t **available; size_t len; #ifdef DEBUG - _Atomic size_t in_use; + atomic_size_t in_use; #endif } buffer_pool_t;