Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-cloud / recipes-extended / uwsgi / files / 0001-pragma-ignore-cast-type-errors-with-gcc-8.3.patch
1 From 377b11c0255d717912f585e7c16c6c053e6cc913 Mon Sep 17 00:00:00 2001
2 From: "Sar Ashki, Babak" <Babak.SarAshki@windriver.com>
3 Date: Thu, 23 Jan 2020 07:02:11 +0000
4 Subject: [PATCH] pragma ignore cast type errors with gcc 8.3
5
6 ---
7  core/emperor.c                  | 2 ++
8  plugins/python/uwsgi_pymodule.c | 4 +++-
9  2 files changed, 5 insertions(+), 1 deletion(-)
10
11 diff --git a/core/emperor.c b/core/emperor.c
12 index 97596556..d64110cb 100644
13 --- a/core/emperor.c
14 +++ b/core/emperor.c
15 @@ -988,7 +988,9 @@ int uwsgi_emperor_vassal_start(struct uwsgi_instance *n_ui) {
16  #if defined(__linux__) && !defined(OBSOLETE_LINUX_KERNEL) && !defined(__ia64__)
17         if (uwsgi.emperor_clone) {
18                 char stack[PTHREAD_STACK_MIN];
19 +#pragma GCC diagnostic ignored "-Wcast-function-type"
20                 pid = clone((int (*)(void *)) uwsgi_emperor_spawn_vassal, stack + PTHREAD_STACK_MIN, SIGCHLD | uwsgi.emperor_clone, (void *) n_ui);
21 +#pragma GCC diagnostic error "-Wcast-function-type"
22         }
23         else {
24  #endif
25 diff --git a/plugins/python/uwsgi_pymodule.c b/plugins/python/uwsgi_pymodule.c
26 index d3075897..ac3ccb89 100644
27 --- a/plugins/python/uwsgi_pymodule.c
28 +++ b/plugins/python/uwsgi_pymodule.c
29 @@ -1,4 +1,5 @@
30  #include "uwsgi_python.h"
31 +#pragma GCC diagnostic ignored "-Wcast-function-type"
32  
33  extern struct uwsgi_server uwsgi;
34  extern struct uwsgi_python up;
35 @@ -2553,6 +2554,7 @@ PyObject *py_uwsgi_parse_file(PyObject * self, PyObject * args) {
36  }
37  
38  static PyMethodDef uwsgi_spooler_methods[] = {
39 +
40  #ifdef PYTHREE
41         {"send_to_spooler", (PyCFunction) py_uwsgi_send_spool, METH_VARARGS | METH_KEYWORDS, ""},
42         {"spool", (PyCFunction) py_uwsgi_send_spool, METH_VARARGS | METH_KEYWORDS, ""},
43 @@ -2569,7 +2571,6 @@ static PyMethodDef uwsgi_spooler_methods[] = {
44         {NULL, NULL},
45  };
46  
47 -
48  PyObject *py_uwsgi_suspend(PyObject * self, PyObject * args) {
49  
50         struct wsgi_request *wsgi_req = py_current_wsgi_req();
51 @@ -3918,3 +3919,4 @@ void init_uwsgi_module_snmp(PyObject * current_uwsgi_module) {
52  
53          uwsgi_log( "SNMP python functions initialized.\n");
54  }
55 +#pragma GCC diagnostic error "-Wcast-function-type"
56 -- 
57 2.23.0
58