From 48dc28996df3f5e1900a0b45ec0cedb45b0bae14 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Wed, 22 Dec 2021 03:43:10 +0100 Subject: [PATCH] Ports: Update Python patches for the recent signal changes The old patch to define `HAVE_SIGSET_T` is no longer needed, as we now have implementations for `sigwaitinfo` and `sigtimedwait`. Instead, for the same reason, we now have to remove a reference to `si_errno`, which we haven't implemented yet but is just assumed to be there. --- Ports/python3/patches/ReadMe.md | 4 ++-- Ports/python3/patches/define-have-sigset-t.patch | 12 ------------ Ports/python3/patches/remove-missing-si-errno.patch | 12 ++++++++++++ 3 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 Ports/python3/patches/define-have-sigset-t.patch create mode 100644 Ports/python3/patches/remove-missing-si-errno.patch diff --git a/Ports/python3/patches/ReadMe.md b/Ports/python3/patches/ReadMe.md index b21e3b8ebe..aace9687b0 100644 --- a/Ports/python3/patches/ReadMe.md +++ b/Ports/python3/patches/ReadMe.md @@ -1,8 +1,8 @@ # Patches for Python 3.9 on SerenityOS -## `define-have-sigset-t.patch` +## `remove-missing-si-errno.patch` -Ensures `HAVE_SIGSET_T` is defined, as we *do* have `sigset_t` but it's not detected properly due to some related functions being missing. +Removes a reference to `si_errno` in `siginfo_t`, as we currently don't have that implemented. ## `include-sys-uio.patch` diff --git a/Ports/python3/patches/define-have-sigset-t.patch b/Ports/python3/patches/define-have-sigset-t.patch deleted file mode 100644 index 86a2cbe3aa..0000000000 --- a/Ports/python3/patches/define-have-sigset-t.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- Python-3.10.1/Modules/posixmodule.h 2021-08-03 19:01:36.368000000 +0100 -+++ Python-3.10.1/Modules/posixmodule.h 2021-08-03 19:01:54.120205211 +0100 -@@ -19,7 +19,8 @@ - #endif /* MS_WINDOWS */ - - #if defined(PYPTHREAD_SIGMASK) || defined(HAVE_SIGWAIT) || \ -- defined(HAVE_SIGWAITINFO) || defined(HAVE_SIGTIMEDWAIT) -+ defined(HAVE_SIGWAITINFO) || defined(HAVE_SIGTIMEDWAIT) || \ -+ defined(__serenity__) - # define HAVE_SIGSET_T - #endif - diff --git a/Ports/python3/patches/remove-missing-si-errno.patch b/Ports/python3/patches/remove-missing-si-errno.patch new file mode 100644 index 0000000000..a224dd19fa --- /dev/null +++ b/Ports/python3/patches/remove-missing-si-errno.patch @@ -0,0 +1,12 @@ +diff -ur a/Modules/signalmodule.c b/Modules/signalmodule.c +--- a/Modules/signalmodule.c 2021-12-06 19:23:39.000000000 +0100 ++++ b/Modules/signalmodule.c 2021-12-22 03:37:56.097759703 +0100 +@@ -1151,7 +1151,7 @@ + PyStructSequence_SET_ITEM(result, 4, PyLong_FromLong(0L)); + PyStructSequence_SET_ITEM(result, 5, PyLong_FromLong(0L)); + #else +- PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong((long)(si->si_errno))); ++ PyStructSequence_SET_ITEM(result, 2, PyLong_FromLong(0L)); + PyStructSequence_SET_ITEM(result, 3, PyLong_FromPid(si->si_pid)); + PyStructSequence_SET_ITEM(result, 4, _PyLong_FromUid(si->si_uid)); + PyStructSequence_SET_ITEM(result, 5,