Skip to content
Snippets Groups Projects
Commit c033c4c7 authored by Yang Tse's avatar Yang Tse
Browse files

Winsock and Cygwin need address family specification before bind(), this...

Winsock and Cygwin need address family specification before bind(), this should be harmless for others.
parent aa791ee5
No related branches found
No related tags found
No related merge requests found
......@@ -575,13 +575,8 @@ CURLcode Curl_tftp_connect(struct connectdata *conn, bool *done)
state->sockfd = state->conn->sock[FIRSTSOCKET];
state->state = TFTP_STATE_START;
#ifdef WIN32
/* AF_UNSPEC == 0 (from above calloc) doesn't work on Winsock */
/* NOTE: this blatantly assumes IPv4. This should be fixed! */
((struct sockaddr_in*)&state->local_addr)->sin_family =
((struct sockaddr *)&state->local_addr)->sa_family =
conn->ip_addr->ai_family;
#endif
tftp_set_timeouts(state);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment