diff options
-rw-r--r-- | meta-python/recipes-devtools/python/python3-twisted/0001-initsendmsg-Return-NULL-on-error.patch | 76 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-twisted_13.2.0.bb | 3 |
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 @@ | |||
1 | From 890d039f067d52a0ab77b561d40da13f0c135634 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 3 Aug 2017 11:24:43 -0700 | ||
4 | Subject: [PATCH] initsendmsg: Return NULL on error | ||
5 | |||
6 | Fixes a clang error | ||
7 | |||
8 | sendmsg.c:129:9: error: non-void function 'initsendmsg' should return a value [-Wreturn-type] | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | twisted/python/sendmsg.c | 14 +++++++------- | ||
13 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
14 | |||
15 | diff --git a/twisted/python/sendmsg.c b/twisted/python/sendmsg.c | ||
16 | index 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 | -- | ||
75 | 2.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 @@ | |||
1 | inherit pypi setuptools3 | 1 | inherit pypi setuptools3 |
2 | require python-twisted.inc | 2 | require python-twisted.inc |
3 | 3 | ||
4 | SRC_URI += "file://0001-initsendmsg-Return-NULL-on-error.patch \ | ||
5 | " | ||
6 | |||
4 | RDEPENDS_${PN}-core = "python3-core python3-zopeinterface python3-lang" | 7 | RDEPENDS_${PN}-core = "python3-core python3-zopeinterface python3-lang" |
5 | 8 | ||
6 | FILES_${PN}-core_append += " \ | 9 | FILES_${PN}-core_append += " \ |