]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Workaround for Cray UNICOS 9.0 to fix ftp.
authorDan Fandrich <dan@coneharvesters.com>
Mon, 21 Aug 2006 22:28:19 +0000 (22:28 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Mon, 21 Aug 2006 22:28:19 +0000 (22:28 +0000)
lib/hostip.c

index fc2513cc2ced42473f482eee9e14ec74bb968839..fd555ef9dad904e854ce6344f61abc274469eebc 100644 (file)
@@ -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;