aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip4.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/hostip4.c
parent0d55f4e1bcc80a457037f3b37cfeedcb076eeed0 (diff)
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/hostip4.c')
-rw-r--r--lib/hostip4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hostip4.c b/lib/hostip4.c
index 3a38b321f..1e39f4a98 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -140,7 +140,7 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname,
#if defined(HAVE_GETADDRINFO_THREADSAFE)
else {
struct addrinfo hints;
- char sbuf[NI_MAXSERV];
+ char sbuf[12];
char *sbufptr = NULL;
memset(&hints, 0, sizeof(hints));