Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
honwen authored and breakwa11 committed Jul 8, 2017
1 parent f713aa9 commit bf324d8
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 bf324d8

Please sign in to comment.