aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-11-10 22:24:49 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-11-10 22:24:49 +0000
commit29676f473da018428f6b12895351b2b7118ece44 (patch)
tree28b10dd3e42ff325a146bae6eae9afa99d2d064f
parenta5fcb26ab16b56907896e4053976359ad537e315 (diff)
David Lang: if there is no sockaddr_storage, make up our own and use that
-rw-r--r--lib/ftp.c4
-rw-r--r--lib/setup.h9
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index c9fa72eda..388e1d289 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -777,11 +777,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
/******************************************************************
* IPv6-specific section
*/
-#ifdef HAVE_STRUCT_SOCKADDR_STORAGE
struct sockaddr_storage ss;
-#else
- char ss[256]; /* this should be big enough to fit a lot */
-#endif
struct addrinfo *res, *ai;
socklen_t sslen;
char hbuf[NI_MAXHOST];
diff --git a/lib/setup.h b/lib/setup.h
index 4b3a50765..bf1a642f4 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -309,4 +309,11 @@ typedef int curl_socket_t;
#define DEBUGF(x)
#endif
-#endif /* __CONFIG_H */
+#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
+struct sockaddr_storage
+ {
+ char buffer[256]; /* this should be big enough to fit a lot */
+ };
+#endif
+
+#endif /* __SETUP_H */