summaryrefslogtreecommitdiffstats
path: root/meta-python
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 /meta-python
parentc3ad7be1cc75ae5419ae4d9cd078e2fc0aaad218 (diff)
downloadmeta-openembedded-c1966a1b3f728aa1d6d861a2791ae0cc10ebb14a.tar.gz
python3-twisted: Fix build with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python')
-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 000000000..d4cf34554
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-twisted/0001-initsendmsg-Return-NULL-on-error.patch
@@ -0,0 +1,76 @@
1From 890d039f067d52a0ab77b561d40da13f0c135634 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 3 Aug 2017 11:24:43 -0700
4Subject: [PATCH] initsendmsg: Return NULL on error
5
6Fixes a clang error
7
8sendmsg.c:129:9: error: non-void function 'initsendmsg' should return a value [-Wreturn-type]
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 twisted/python/sendmsg.c | 14 +++++++-------
13 1 file changed, 7 insertions(+), 7 deletions(-)
14
15diff --git a/twisted/python/sendmsg.c b/twisted/python/sendmsg.c
16index 9f2fd8c..9c080e1 100644
17--- a/twisted/python/sendmsg.c
18+++ b/twisted/python/sendmsg.c
19@@ -126,7 +126,7 @@ PyMODINIT_FUNC initsendmsg(void) {
20 module = Py_InitModule3("sendmsg", sendmsg_methods, sendmsg_doc);
21
22 if (!module) {
23- return;
24+ return NULL;
25 }
26
27 /*
28@@ -135,39 +135,39 @@ PyMODINIT_FUNC initsendmsg(void) {
29 */
30
31 if (-1 == PyModule_AddIntConstant(module, "SCM_RIGHTS", SCM_RIGHTS)) {
32- return;
33+ return NULL;
34 }
35
36
37 /* BSD, Darwin, Hurd */
38 #if defined(SCM_CREDS)
39 if (-1 == PyModule_AddIntConstant(module, "SCM_CREDS", SCM_CREDS)) {
40- return;
41+ return NULL;
42 }
43 #endif
44
45 /* Linux */
46 #if defined(SCM_CREDENTIALS)
47 if (-1 == PyModule_AddIntConstant(module, "SCM_CREDENTIALS", SCM_CREDENTIALS)) {
48- return;
49+ return NULL;
50 }
51 #endif
52
53 /* Apparently everywhere, but not standardized. */
54 #if defined(SCM_TIMESTAMP)
55 if (-1 == PyModule_AddIntConstant(module, "SCM_TIMESTAMP", SCM_TIMESTAMP)) {
56- return;
57+ return NULL;
58 }
59 #endif
60
61 module = PyImport_ImportModule("socket");
62 if (!module) {
63- return;
64+ return NULL;
65 }
66
67 sendmsg_socket_error = PyObject_GetAttrString(module, "error");
68 if (!sendmsg_socket_error) {
69- return;
70+ return NULL;
71 }
72 }
73
74--
752.13.4
76
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 98016cca3..57406cd52 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 @@
1inherit pypi setuptools3 1inherit pypi setuptools3
2require python-twisted.inc 2require python-twisted.inc
3 3
4SRC_URI += "file://0001-initsendmsg-Return-NULL-on-error.patch \
5 "
6
4RDEPENDS_${PN}-core = "python3-core python3-zopeinterface python3-lang" 7RDEPENDS_${PN}-core = "python3-core python3-zopeinterface python3-lang"
5 8
6FILES_${PN}-core_append += " \ 9FILES_${PN}-core_append += " \