pyodide/cpython/patches/0006-fix-Py_Sigset_Converte...

46 lines
1.1 KiB
Diff

From 63fd6ee84261ff357d3d3b56a35b756c4d13ce69 Mon Sep 17 00:00:00 2001
From: Roman Yurchak <rth.yurchak@gmail.com>
Date: Sun, 5 Jul 2020 21:17:10 +0200
Subject: [PATCH] fix Py_Sigset_Converter
---
Modules/posixmodule.c | 7 +++++++
Modules/posixmodule.h | 2 --
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index c984e2e..9d1bbee 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1486,6 +1486,13 @@ error:
Py_DECREF(iterator);
return 0;
}
+#else
+int
+_Py_Sigset_Converter(PyObject *obj, void *addr)
+{
+ PyErr_SetFromErrno(PyExc_OSError);
+ return 0;
+}
#endif /* HAVE_SIGSET_T */
#ifdef MS_WINDOWS
diff --git a/Modules/posixmodule.h b/Modules/posixmodule.h
index 711ac68..5452ffb 100644
--- a/Modules/posixmodule.h
+++ b/Modules/posixmodule.h
@@ -23,9 +23,7 @@ PyAPI_FUNC(int) _Py_Gid_Converter(PyObject *, gid_t *);
# define HAVE_SIGSET_T
#endif
-#ifdef HAVE_SIGSET_T
PyAPI_FUNC(int) _Py_Sigset_Converter(PyObject *, void *);
-#endif /* HAVE_SIGSET_T */
#endif /* Py_LIMITED_API */
#ifdef __cplusplus
--
2.17.1