aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-08-08 14:47:57 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-08-13 13:21:01 +0200
commitc1966a1b3f728aa1d6d861a2791ae0cc10ebb14a (patch)
treebd42b80697140f0d57d58b3c29360be3a3cc46aa
parentc3ad7be1cc75ae5419ae4d9cd078e2fc0aaad218 (diff)
downloadmeta-openembedded-contrib-c1966a1b3f728aa1d6d861a2791ae0cc10ebb14a.tar.gz
meta-openembedded-contrib-c1966a1b3f728aa1d6d861a2791ae0cc10ebb14a.tar.bz2
meta-openembedded-contrib-c1966a1b3f728aa1d6d861a2791ae0cc10ebb14a.zip
python3-twisted: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-python/recipes-devtools/python/python3-twisted/0001-initsendmsg-Return-NULL-on-error.patch76
-rw-r--r--meta-python/recipes-devtools/python/python3-twisted_13.2.0.bb3
2 files changed, 79 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-twisted/0001-initsendmsg-Return-NULL-on-error.patch b/meta-python/recipes-devtools/python/python3-twisted/0001-initsendmsg-Return-NULL-on-error.patch
new file mode 100644
index 0000000000..d4cf345541
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-twisted/0001-initsendmsg-Return-NULL-on-error.patch
@@ -0,0 +1,76 @@
+From 890d039f067d52a0ab77b561d40da13f0c135634 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 3 Aug 2017 11:24:43 -0700
+Subject: [PATCH] initsendmsg: Return NULL on error
+
+Fixes a clang error
+
+sendmsg.c:129:9: error: non-void function 'initsendmsg' should return a value [-Wreturn-type]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ twisted/python/sendmsg.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/twisted/python/sendmsg.c b/twisted/python/sendmsg.c
+index 9f2fd8c..9c080e1 100644
+--- a/twisted/python/sendmsg.c
++++ b/twisted/python/sendmsg.c
+@@ -126,7 +126,7 @@ PyMODINIT_FUNC initsendmsg(void) {
+ module = Py_InitModule3("sendmsg", sendmsg_methods, sendmsg_doc);
+
+ if (!module) {
+- return;
++ return NULL;
+ }
+
+ /*
+@@ -135,39 +135,39 @@ PyMODINIT_FUNC initsendmsg(void) {
+ */
+
+ if (-1 == PyModule_AddIntConstant(module, "SCM_RIGHTS", SCM_RIGHTS)) {
+- return;
++ return NULL;
+ }
+
+
+ /* BSD, Darwin, Hurd */
+ #if defined(SCM_CREDS)
+ if (-1 == PyModule_AddIntConstant(module, "SCM_CREDS", SCM_CREDS)) {
+- return;
++ return NULL;
+ }
+ #endif
+
+ /* Linux */
+ #if defined(SCM_CREDENTIALS)
+ if (-1 == PyModule_AddIntConstant(module, "SCM_CREDENTIALS", SCM_CREDENTIALS)) {
+- return;
++ return NULL;
+ }
+ #endif
+
+ /* Apparently everywhere, but not standardized. */
+ #if defined(SCM_TIMESTAMP)
+ if (-1 == PyModule_AddIntConstant(module, "SCM_TIMESTAMP", SCM_TIMESTAMP)) {
+- return;
++ return NULL;
+ }
+ #endif
+
+ module = PyImport_ImportModule("socket");
+ if (!module) {
+- return;
++ return NULL;
+ }
+
+ sendmsg_socket_error = PyObject_GetAttrString(module, "error");
+ if (!sendmsg_socket_error) {
+- return;
++ return NULL;
+ }
+ }
+
+--
+2.13.4
+
diff --git a/meta-python/recipes-devtools/python/python3-twisted_13.2.0.bb b/meta-python/recipes-devtools/python/python3-twisted_13.2.0.bb
index 98016cca39..57406cd527 100644
--- a/meta-python/recipes-devtools/python/python3-twisted_13.2.0.bb
+++ b/meta-python/recipes-devtools/python/python3-twisted_13.2.0.bb
@@ -1,6 +1,9 @@
inherit pypi setuptools3
require python-twisted.inc
+SRC_URI += "file://0001-initsendmsg-Return-NULL-on-error.patch \
+ "
+
RDEPENDS_${PN}-core = "python3-core python3-zopeinterface python3-lang"
FILES_${PN}-core_append += " \