From f9d412bccae9996efe5f0e4f101a589555e80aa0 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Sun, 29 Sep 2013 21:35:38 +0200 Subject: [PATCH 1/2] uwsgiconfig: restore obsolete linux check on ia64 Fix #397 --- uwsgiconfig.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uwsgiconfig.py b/uwsgiconfig.py index 75b9df02..f238ba68 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -529,8 +529,9 @@ class uConf(object): report['kernel'] = uwsgi_os - if uwsgi_os == 'Linux' and uwsgi_cpu != 'ia64': - self.gcc_list.append('lib/linux_ns') + if uwsgi_os == 'Linux': + if uwsgi_cpu != 'ia64': + self.gcc_list.append('lib/linux_ns') try: lk_ver = uwsgi_os_k.split('.') if int(lk_ver[0]) <= 2 and int(lk_ver[1]) <= 6 and int(lk_ver[2]) <= 9: From 4032efd3e8c5f6e1c47dad3dedd5c574f28dae6e Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Sun, 29 Sep 2013 21:45:07 +0200 Subject: [PATCH 2/2] Add proper ifdefery for namespaces on ia64 Fix #398 --- core/uwsgi.c | 2 ++ uwsgi.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/uwsgi.c b/core/uwsgi.c index 0db57e3a..db54464e 100644 --- a/core/uwsgi.c +++ b/core/uwsgi.c @@ -2415,9 +2415,11 @@ int uwsgi_start(void *v_argv) { #ifdef __linux__ uwsgi_set_cgroup(); +#if !defined(__ia64__) if (uwsgi.ns) { linux_namespace_jail(); } +#endif #endif uwsgi_hooks_run(uwsgi.hook_in_jail, "in-jail", 1); diff --git a/uwsgi.h b/uwsgi.h index 84384bab..fb08b14f 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -3159,8 +3159,10 @@ int uwsgi_str3_num(char *); int uwsgi_str4_num(char *); #ifdef __linux__ +#if !defined(__ia64__) void linux_namespace_start(void *); void linux_namespace_jail(void); +#endif int uwsgi_netlink_veth(char *, char *); int uwsgi_netlink_veth_attach(char *, pid_t); int uwsgi_netlink_ifup(char *);