1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-11 03:55:03 -05:00

Winsock and Cygwin need address family specification before bind(), this should be harmless for others.

This commit is contained in:
Yang Tse 2006-07-29 16:17:36 +00:00
parent aa791ee5cf
commit c033c4c71c

View File

@ -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);