summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2022-01-04 12:21:20 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2022-01-04 12:21:20 +0000
commit65ef05d3ff8daaff5c263a32f0da4dd01529c690 (patch)
tree48ded1f66f1358505c438c5e49735634bfdef673
parent107e45072a2bf934494644442541b378c5fbfcb9 (diff)
downloadtoolchains-65ef05d3ff8daaff5c263a32f0da4dd01529c690.tar.gz
toolchains-65ef05d3ff8daaff5c263a32f0da4dd01529c690.tar.bz2
ppc-amigaos: Fix libcurl buildchris/sdk-5334
-rw-r--r--sdk/recipes/patches/libcurl/ppc-amigaos/configure.p13
-rw-r--r--sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p8
-rw-r--r--sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p39
3 files changed, 36 insertions, 24 deletions
diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/configure.p b/sdk/recipes/patches/libcurl/ppc-amigaos/configure.p
new file mode 100644
index 0000000..91bf677
--- /dev/null
+++ b/sdk/recipes/patches/libcurl/ppc-amigaos/configure.p
@@ -0,0 +1,13 @@
+--- configure 2022-01-04 11:43:20.490235234 +0000
++++ configure 2022-01-04 11:56:40.357605123 +0000
+@@ -44201,9 +44201,7 @@ fi
+
+ if test "$USE_THREADS_POSIX" != "1"
+ then
+- CFLAGS="$CFLAGS -pthread"
+- # assign PTHREAD for pkg-config use
+- PTHREAD=" -pthread"
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
+ $as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+ if ${ac_cv_lib_pthread_pthread_create+:} false; then :
diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p
index 0e52d73..b0c6404 100644
--- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p
+++ b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p
@@ -1,9 +1,9 @@
---- lib/curl_setup.h 2019-03-30 13:44:08.576270700 +0000
-+++ lib/curl_setup.h 2019-03-30 13:44:33.011975643 +0000
-@@ -314,7 +314,8 @@
- # include <exec/execbase.h>
+--- lib/curl_setup.h 2022-01-04 10:53:18.770467711 +0000
++++ lib/curl_setup.h 2022-01-04 10:54:58.216791681 +0000
+@@ -286,7 +286,8 @@
# include <proto/exec.h>
# include <proto/dos.h>
+ # include <unistd.h>
-# ifdef HAVE_PROTO_BSDSOCKET_H
+# define HAVE_SELECT 1
+# if 0
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) */