diff --git a/src/ChangeLog b/src/ChangeLog index e9535558..330ec2b2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2003-11-05 Hrvoje Niksic + + * connect.c (bindport): Fix compilation under pre-C99 compilers. + 2003-11-05 Hrvoje Niksic * connect.c (connect_to_ip): More compact error checking. diff --git a/src/connect.c b/src/connect.c index c65868d8..62ce2af9 100644 --- a/src/connect.c +++ b/src/connect.c @@ -397,7 +397,6 @@ bindport (const ip_address *bind_address, int *port, int *local_sock) int family = AF_INET; struct sockaddr_storage ss; struct sockaddr *sa = (struct sockaddr *)&ss; - xzero (ss); /* For setting options with setsockopt. */ int setopt_val = 1; @@ -423,6 +422,7 @@ bindport (const ip_address *bind_address, int *port, int *local_sock) # endif #endif + xzero (ss); sockaddr_set_data (sa, bind_address, *port); if (bind (sock, sa, sockaddr_size (sa)) < 0) {