mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-22 15:16:58 +00:00
fix build on win32
This commit is contained in:
+10
-9
@@ -183,8 +183,9 @@ int create_and_bind(const char *addr, const char *port)
|
||||
static void free_connections(struct ev_loop *loop)
|
||||
{
|
||||
struct cork_dllist_item *curr;
|
||||
for (curr = cork_dllist_start(&connections); !cork_dllist_is_end(&connections, curr);
|
||||
curr = curr->next) {
|
||||
for (curr = cork_dllist_start(&connections);
|
||||
!cork_dllist_is_end(&connections, curr);
|
||||
curr = curr->next) {
|
||||
struct server *server = cork_container_of(curr, struct server, entries);
|
||||
struct remote *remote = server->remote;
|
||||
close_and_free_server(loop, server);
|
||||
@@ -904,11 +905,11 @@ int main(int argc, char **argv)
|
||||
int option_index = 0;
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{ "fast-open", no_argument, 0,
|
||||
{ "fast-open", no_argument, 0,
|
||||
0 },
|
||||
{ "acl", required_argument, 0,
|
||||
{ "acl", required_argument, 0,
|
||||
0 },
|
||||
{ 0, 0, 0,
|
||||
{ 0, 0, 0,
|
||||
0 }
|
||||
};
|
||||
|
||||
@@ -1046,11 +1047,11 @@ int main(int argc, char **argv)
|
||||
|
||||
#ifdef __MINGW32__
|
||||
winsock_init();
|
||||
#endif
|
||||
|
||||
#else
|
||||
// ignore SIGPIPE
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
signal(SIGABRT, SIG_IGN);
|
||||
#endif
|
||||
|
||||
struct ev_signal sigint_watcher;
|
||||
struct ev_signal sigterm_watcher;
|
||||
@@ -1172,11 +1173,11 @@ int start_ss_local_server(profile_t profile)
|
||||
|
||||
#ifdef __MINGW32__
|
||||
winsock_init();
|
||||
#endif
|
||||
|
||||
#else
|
||||
// ignore SIGPIPE
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
signal(SIGABRT, SIG_IGN);
|
||||
#endif
|
||||
|
||||
struct ev_signal sigint_watcher;
|
||||
struct ev_signal sigterm_watcher;
|
||||
|
||||
+5
-4
@@ -99,8 +99,9 @@ static struct cork_dllist connections;
|
||||
static void free_connections(struct ev_loop *loop)
|
||||
{
|
||||
struct cork_dllist_item *curr;
|
||||
for (curr = cork_dllist_start(&connections); !cork_dllist_is_end(&connections, curr);
|
||||
curr = curr->next) {
|
||||
for (curr = cork_dllist_start(&connections);
|
||||
!cork_dllist_is_end(&connections, curr);
|
||||
curr = curr->next) {
|
||||
struct server *server = cork_container_of(curr, struct server, entries);
|
||||
struct remote *remote = server->remote;
|
||||
close_and_free_server(loop, server);
|
||||
@@ -925,8 +926,8 @@ int main(int argc, char **argv)
|
||||
int option_index = 0;
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{ "fast-open", no_argument, 0, 0 },
|
||||
{ 0, 0, 0, 0 }
|
||||
{ "fast-open", no_argument, 0, 0 },
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
opterr = 0;
|
||||
|
||||
Reference in New Issue
Block a user