|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT/PYTHON3 v4 03/14] patches: Fix build issues
Hi Costin, Vlad, this looks ok, thanks.
Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx>
On 13.10.19, 17:28, "Costin Lupu" <costin.lupu@xxxxxxxxx> wrote:
From: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
* Undefine HAVE_FORK and HAVE_EXECV
* Use pthread_t to unsigned long conversion
Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
...1-Undefine-HAVE_FORK-and-HAVE_EXECVE.patch | 26 ++++++++++++
...thread_t-to-unsigned-long-conversion.patch | 40 +++++++++++++++++++
2 files changed, 66 insertions(+)
create mode 100644 patches/0001-Undefine-HAVE_FORK-and-HAVE_EXECVE.patch
create mode 100644
patches/0002-Use-pthread_t-to-unsigned-long-conversion.patch
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 <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+Date: Mon, 2 Sep 2019 04:23:30 +0300
+Subject: [PATCH] Undefine HAVE_FORK and HAVE_EXECVE
+
+Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+---
+ 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 <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+Date: Sat, 12 Oct 2019 16:28:02 +0300
+Subject: [PATCH] Use pthread_t to unsigned long conversion
+
+Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
+Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
+---
+ 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
+
--
2.20.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |