Skip to content

Commit

Permalink
Merge pull request #1 from shadowsocksr-rm/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Akkariiin authored Jul 29, 2017
2 parents f713aa9 + bf324d8 commit 035d4b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/local.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,11 @@ remote_send_cb(EV_P_ ev_io *w, int revents)
if (!remote_send_ctx->connected) {
int err_no = 0;
socklen_t len = sizeof err_no;
int r = getsockopt(remote->fd, SOL_SOCKET, SO_ERROR, &err_no, &len);
#ifdef __MINGW32__
int r = getsockopt(remote->fd, SOL_SOCKET, SO_ERROR, (char *)&err_no, &len);
#else
int r = getsockopt(remote->fd, SOL_SOCKET, SO_ERROR, &err_no, &len);
#endif
if (r == 0 && err_no == 0) {
remote_send_ctx->connected = 1;
ev_timer_stop(EV_A_ & remote_send_ctx->watcher);
Expand Down

0 comments on commit 035d4b9

Please sign in to comment.