From: Vlad-Andrei Badoiu Date: Wed, 16 Oct 2019 14:22:34 +0000 (+0300) Subject: patches: Fix build issues X-Git-Tag: RELEASE-0.6~18 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9cc63d4fa33d259577d1e43b6c03f2732c4871e0;p=unikraft%2Flibs%2Fpython3.git patches: Fix build issues * Undefine HAVE_FORK and HAVE_EXECV * Use pthread_t to unsigned long conversion Signed-off-by: Vlad-Andrei Badoiu Signed-off-by: Costin Lupu Reviewed-by: Felipe Huici --- diff --git a/patches/0001-Undefine-HAVE_FORK-and-HAVE_EXECVE.patch b/patches/0001-Undefine-HAVE_FORK-and-HAVE_EXECVE.patch new file mode 100644 index 0000000..d4c8f3f --- /dev/null +++ b/patches/0001-Undefine-HAVE_FORK-and-HAVE_EXECVE.patch @@ -0,0 +1,26 @@ +From 47e57bc46cab3c92f4137bf183534d593ebea211 Mon Sep 17 00:00:00 2001 +From: Vlad-Andrei Badoiu +Date: Mon, 2 Sep 2019 04:23:30 +0300 +Subject: [PATCH] Undefine HAVE_FORK and HAVE_EXECVE + +Signed-off-by: Vlad-Andrei Badoiu +--- + Modules/posixmodule.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +index b758e76..aed9e22 100644 +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -175,8 +175,6 @@ corresponding Unix manual entries for more information on calls."); + #define fsync _commit + #else + /* Unix functions that the configure script doesn't check for */ +-#define HAVE_EXECV 1 +-#define HAVE_FORK 1 + #if defined(__USLC__) && defined(__SCO_VERSION__) /* SCO UDK Compiler */ + #define HAVE_FORK1 1 + #endif +-- +2.20.1 + diff --git a/patches/0002-Use-pthread_t-to-unsigned-long-conversion.patch b/patches/0002-Use-pthread_t-to-unsigned-long-conversion.patch new file mode 100644 index 0000000..2858395 --- /dev/null +++ b/patches/0002-Use-pthread_t-to-unsigned-long-conversion.patch @@ -0,0 +1,40 @@ +From 81399f6373ea09bfed792b477f5a55e721ba4b8b Mon Sep 17 00:00:00 2001 +From: Vlad-Andrei Badoiu +Date: Sat, 12 Oct 2019 16:28:02 +0300 +Subject: [PATCH] Use pthread_t to unsigned long conversion + +Signed-off-by: Vlad-Andrei Badoiu +Signed-off-by: Costin Lupu +--- + Python/thread_pthread.h | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h +index f79f9b9..55d4c70 100644 +--- a/Python/thread_pthread.h ++++ b/Python/thread_pthread.h +@@ -241,7 +241,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg) + #if SIZEOF_PTHREAD_T <= SIZEOF_LONG + return (unsigned long) th; + #else +- return (unsigned long) *(unsigned long *) &th; ++ return pthread_to_unsigned_long(&th); + #endif + } + +@@ -258,7 +258,12 @@ PyThread_get_thread_ident(void) + if (!initialized) + PyThread_init_thread(); + threadid = pthread_self(); ++ ++#if SIZEOF_PTHREAD_T <= SIZEOF_LONG + return (unsigned long) threadid; ++#else ++ return pthread_to_unsigned_long((pthread_t *) &threadid); ++#endif + } + + void +-- +2.20.1 +