From 4b2fdb3d30b670ef55943ca91da9ffeb50533792 Mon Sep 17 00:00:00 2001 From: "roberto@mrspurr" Date: Sun, 2 Jan 2011 18:53:14 +0100 Subject: [PATCH] OSX fixes --- uwsgi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uwsgi.c b/uwsgi.c index 379027b8..24d51379 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -708,7 +708,8 @@ int uwsgi_start(void *v_argv) { uwsgi_log("my PID is %d\n", (int) getpid()); - if (getpid() == 1) { +#ifdef __linux__ + if (uwsgi.ns && getpid() == 1) { if (sethostname("uwsgifakehost", strlen("uwsgifakehost"))) { uwsgi_error("sethostname()"); } @@ -749,6 +750,7 @@ int uwsgi_start(void *v_argv) { uwsgi_error("mount()"); } } +#endif uwsgi_as_root();