From 430e5d27aa17307241674122c28bfd1ea38b6a60 Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Thu, 9 Sep 2021 01:55:01 +0800 Subject: [PATCH] Ports: Fix compilation of python3 socket module --- Ports/python3/patches/ReadMe.md | 4 ++++ Ports/python3/patches/include-sys-uio.patch | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Ports/python3/patches/include-sys-uio.patch diff --git a/Ports/python3/patches/ReadMe.md b/Ports/python3/patches/ReadMe.md index 1574c2c4392..b21e3b8ebe9 100644 --- a/Ports/python3/patches/ReadMe.md +++ b/Ports/python3/patches/ReadMe.md @@ -4,6 +4,10 @@ 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. +## `include-sys-uio.patch` + +Ensures `struct iovec` is defined, required by the socket module. + ## `define-py-force-utf8-locale.patch` Enforce UTF-8 as encoding by defining `_Py_FORCE_UTF8_LOCALE`. diff --git a/Ports/python3/patches/include-sys-uio.patch b/Ports/python3/patches/include-sys-uio.patch new file mode 100644 index 00000000000..841027d37d2 --- /dev/null +++ b/Ports/python3/patches/include-sys-uio.patch @@ -0,0 +1,11 @@ +--- Python-3.10.0rc1/Modules/socketmodule.c 2021-09-09 01:14:41.120232921 +0800 ++++ Python-3.10.0rc1/Modules/socketmodule.c 2021-08-03 03:53:59.000000000 +0800 +@@ -171,7 +171,7 @@ + # undef HAVE_GETHOSTBYNAME_R_6_ARG + #endif + +-#if defined(__OpenBSD__) ++#if defined(__OpenBSD__) || defined(__serenity__) + # include + #endif +