net_http_new_socket - C89 compatibility fixes

This commit is contained in:
twinaphex 2015-03-20 18:04:46 +01:00
parent ddc48dac87
commit 871b6944cb

View File

@ -65,6 +65,7 @@ struct http_connection_t
static int net_http_new_socket(const char * domain, int port)
{
char portstr[16];
int fd, i = 1;
#ifdef _WIN32
u_long mode = 1;
@ -72,7 +73,6 @@ static int net_http_new_socket(const char * domain, int port)
struct timeval timeout;
#endif
struct addrinfo hints, *addr = NULL;
char portstr[16];
snprintf(portstr, sizeof(portstr), "%i", port);