mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Fix compilation under pre-C99 compilers.
This commit is contained in:
parent
8a7dda95aa
commit
1131c6a116
@ -1,3 +1,7 @@
|
|||||||
|
2003-11-05 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* connect.c (bindport): Fix compilation under pre-C99 compilers.
|
||||||
|
|
||||||
2003-11-05 Hrvoje Niksic <hniksic@xemacs.org>
|
2003-11-05 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* connect.c (connect_to_ip): More compact error checking.
|
* connect.c (connect_to_ip): More compact error checking.
|
||||||
|
@ -397,7 +397,6 @@ bindport (const ip_address *bind_address, int *port, int *local_sock)
|
|||||||
int family = AF_INET;
|
int family = AF_INET;
|
||||||
struct sockaddr_storage ss;
|
struct sockaddr_storage ss;
|
||||||
struct sockaddr *sa = (struct sockaddr *)&ss;
|
struct sockaddr *sa = (struct sockaddr *)&ss;
|
||||||
xzero (ss);
|
|
||||||
|
|
||||||
/* For setting options with setsockopt. */
|
/* For setting options with setsockopt. */
|
||||||
int setopt_val = 1;
|
int setopt_val = 1;
|
||||||
@ -423,6 +422,7 @@ bindport (const ip_address *bind_address, int *port, int *local_sock)
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
xzero (ss);
|
||||||
sockaddr_set_data (sa, bind_address, *port);
|
sockaddr_set_data (sa, bind_address, *port);
|
||||||
if (bind (sock, sa, sockaddr_size (sa)) < 0)
|
if (bind (sock, sa, sockaddr_size (sa)) < 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user