summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_python_wsgi.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-03-14 19:52:57 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-03-14 19:52:57 +0300
commite13cbdb439b801685708231b18bca6181d8c4592 (patch)
tree25898235ef3b6977460e78d592f4569887b89fe1 /src/nxt_python_wsgi.c
parent5135fcea930985dab45085033c5aae54c6ad1a65 (diff)
downloadunit-e13cbdb439b801685708231b18bca6181d8c4592.tar.gz
unit-e13cbdb439b801685708231b18bca6181d8c4592.tar.bz2
Solaris compatibilty.
Diffstat (limited to '')
-rw-r--r--src/nxt_python_wsgi.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/nxt_python_wsgi.c b/src/nxt_python_wsgi.c
index 30bd4939..da2b4d76 100644
--- a/src/nxt_python_wsgi.c
+++ b/src/nxt_python_wsgi.c
@@ -10,10 +10,6 @@
#include <compile.h>
#include <node.h>
-#ifdef _DARWIN_C_SOURCE
-#undef _DARWIN_C_SOURCE
-#endif
-
#include <nxt_main.h>
#include <nxt_runtime.h>
#include <nxt_application.h>
@@ -426,7 +422,7 @@ nxt_python_run(nxt_app_request_t *r)
static PyObject *
nxt_python_create_environ(nxt_thread_t *thr)
{
- PyObject *obj, *stderr, *environ;
+ PyObject *obj, *err, *environ;
environ = PyDict_New();
@@ -527,14 +523,14 @@ nxt_python_create_environ(nxt_thread_t *thr)
obj = NULL;
- stderr = PySys_GetObject((char *) "stderr");
+ err = PySys_GetObject((char *) "stderr");
- if (nxt_slow_path(stderr == NULL)) {
+ if (nxt_slow_path(err == NULL)) {
nxt_log_alert(thr->log, "Python failed to get \"sys.stderr\" object");
goto fail;
}
- if (nxt_slow_path(PyDict_SetItemString(environ, "wsgi.error", stderr) != 0))
+ if (nxt_slow_path(PyDict_SetItemString(environ, "wsgi.error", err) != 0))
{
nxt_log_alert(thr->log,
"Python failed to set the \"wsgi.error\" environ value");