summaryrefslogtreecommitdiff
path: root/lib/asyn-thread.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-09-10 23:18:43 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-09-10 23:18:43 +0200
commit0b5ae7c80eb41ea75b10e5195286e6d0c35cef88 (patch)
tree8df509275a4aaa6f07f3d3fac6c2279817d9cf31 /lib/asyn-thread.c
parent0d55f4e1bcc80a457037f3b37cfeedcb076eeed0 (diff)
downloadcurl-0b5ae7c80eb41ea75b10e5195286e6d0c35cef88.tar.gz
NI_MAXSERV: remove all use of it
Solaris with the SunStudio Compiler is reportedly missing this define, but as we're using it without any good reason on all the places it was used I've now instead switched to just use sensible buffer sizes that fit a 32 bit decimal number. Which also happens to be smaller than the common NI_MAXSERV value which is 32 on most machines. Bug: http://curl.haxx.se/bug/view.cgi?id=1277 Reported-by: D.Flinkmann
Diffstat (limited to 'lib/asyn-thread.c')
-rw-r--r--lib/asyn-thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index 66fb510f4..81d1d5d5d 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.c
@@ -265,7 +265,7 @@ static int getaddrinfo_complete(struct connectdata *conn)
static unsigned int CURL_STDCALL getaddrinfo_thread (void *arg)
{
struct thread_sync_data *tsd = (struct thread_sync_data*)arg;
- char service [NI_MAXSERV];
+ char service[12];
int rc;
snprintf(service, sizeof(service), "%d", tsd->port);
@@ -559,7 +559,7 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
struct in_addr in;
Curl_addrinfo *res;
int error;
- char sbuf[NI_MAXSERV];
+ char sbuf[12];
int pf = PF_INET;
#ifdef CURLRES_IPV6
struct in6_addr in6;