aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2006-08-21 22:28:19 +0000
committerDan Fandrich <dan@coneharvesters.com>2006-08-21 22:28:19 +0000
commit77516822f643849082fbcde2b0bff75f155f1142 (patch)
tree83979df312a4df9bb8a1d8258d9236561dd8eba6
parent37d8c67530ad61a4f345ff2d506ac4c2f9b01d85 (diff)
Workaround for Cray UNICOS 9.0 to fix ftp.
-rw-r--r--lib/hostip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index fc2513cc2..fd555ef9d 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -609,7 +609,14 @@ Curl_addrinfo *Curl_ip2addr(in_addr_t num, const char *hostname, int port)
h = &buf->hostentry;
h->h_addr_list = &buf->h_addr_list[0];
addrentry = &buf->addrentry;
+#ifdef _CRAYC
+ /* On UNICOS, s_addr is a bit field and for some reason assigning to it
+ * doesn't work. There must be a better fix than this ugly hack.
+ */
+ memcpy(addrentry, &num, SIZEOF_in_addr);
+#else
addrentry->s_addr = num;
+#endif
h->h_addr_list[0] = (char*)addrentry;
h->h_addr_list[1] = NULL;
h->h_addrtype = AF_INET;