diff options
author | Yang Tse <yangsita@gmail.com> | 2006-07-29 16:17:36 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2006-07-29 16:17:36 +0000 |
commit | c033c4c71c44a29a043941c83688e2042dcd6660 (patch) | |
tree | e6dd1bac300dd5f629d05a2d993e54d8d71cabe0 /lib | |
parent | aa791ee5cf4d3e432ba421a01f72bc23a78724c2 (diff) |
Winsock and Cygwin need address family specification before bind(), this should be harmless for others.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tftp.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/tftp.c b/lib/tftp.c index 38adc0c75..1bf7281bb 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -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); |