diff options
Diffstat (limited to 'sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p')
-rw-r--r-- | sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p index 39952b8..8d3ffa1 100644 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p +++ b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p @@ -1,6 +1,6 @@ ---- lib/hostip4.c 2020-01-05 09:50:51.000000000 +0000 -+++ lib/hostip4.c 2020-05-07 16:02:59.313823259 +0100 -@@ -120,6 +120,10 @@ Curl_addrinfo *Curl_getaddrinfo(struct c +--- lib/hostip4.c 2022-01-04 10:57:27.790270827 +0000 ++++ lib/hostip4.c 2022-01-04 11:01:43.125967497 +0000 +@@ -120,6 +120,10 @@ struct Curl_addrinfo *Curl_getaddrinfo(s * implying that only threadsafe code and function calls may be used. * */ @@ -8,23 +8,23 @@ +#include <proto/exec.h> +#include <proto/bsdsocket.h> +#endif - Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, - int port) + struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, + int port) { -@@ -130,6 +134,9 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const +@@ -129,6 +133,9 @@ struct Curl_addrinfo *Curl_ipv4_resolve_ + struct Curl_addrinfo *ai = NULL; struct hostent *h = NULL; - struct in_addr in; struct hostent *buf = NULL; +#ifdef __amigaos4__ + struct SocketIFace *ISocket = NULL; +#endif - #ifdef ENABLE_IPV6 - { -@@ -302,7 +309,20 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const - * gethostbyname() is the preferred one. - */ - else { + #if defined(HAVE_GETADDRINFO_THREADSAFE) + struct addrinfo hints; +@@ -284,7 +291,20 @@ struct Curl_addrinfo *Curl_ipv4_resolve_ + * getaddrinfo() nor gethostbyname_r() function or for which + * gethostbyname() is the preferred one. + */ +#ifdef __amigaos4__ + struct Library *SocketBase = IExec->OpenLibrary("bsdsocket.library", 4); + if (SocketBase) @@ -36,17 +36,16 @@ + { + h = ISocket->gethostbyname((void*)hostname); + } -+#else - h = gethostbyname((void *)hostname); ++#else + h = gethostbyname((void *)hostname); +#endif #endif /* HAVE_GETADDRINFO_THREADSAFE || HAVE_GETHOSTBYNAME_R */ - } -@@ -312,7 +332,14 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const - if(buf) /* used a *_r() function */ + if(h) { +@@ -294,6 +314,14 @@ struct Curl_addrinfo *Curl_ipv4_resolve_ free(buf); } -- + +#ifdef __amigaos4__ + if (ISocket) + { @@ -54,7 +53,7 @@ + IExec->DropInterface((struct Interface *)ISocket); + IExec->CloseLibrary(SocketBase); + } -+#endif ++#endif return ai; } #endif /* defined(CURLRES_IPV4) && !defined(CURLRES_ARES) */ |