X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=jbsockets.c;h=76eddf4780451bc0a48117189668f2fcfa4d1daf;hb=a51f4b51843337c9335f6976a1acde693089de18;hp=6ff9b3c4e201164234d9a0fad8d75f2b1e7dc6c7;hpb=333512b6d15f4b6ccd2c990eb71569f3b3e66880;p=privoxy.git diff --git a/jbsockets.c b/jbsockets.c index 6ff9b3c4..76eddf47 100644 --- a/jbsockets.c +++ b/jbsockets.c @@ -1,4 +1,4 @@ -const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.110 2011/11/18 23:53:26 fabiankeil Exp $"; +const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.111 2011/12/10 17:26:30 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $ @@ -976,6 +976,16 @@ void get_host_information(jb_socket afd, char **ip_address, char **port, log_error(LOG_LEVEL_ERROR, "getsockname() truncated server address"); return; } +/* + * XXX: Workaround for missing header on Windows when + * configured with --disable-ipv6-support. + * The proper fix is to not use NI_MAXSERV in + * that case. It works by accident on other platforms + * as in included unconditionally there. + */ +#ifndef NI_MAXSERV +#define NI_MAXSERV 32 +#endif *port = malloc(NI_MAXSERV); if (NULL == *port) {