From 702dc44fad7e6a5fd714afeca84c85fa13d552ae Mon Sep 17 00:00:00 2001 From: "roberto@openindiana64" Date: Mon, 3 Oct 2011 15:46:04 +0200 Subject: [PATCH] fixed openindiana build on 64bit --- uwsgi.c | 2 +- uwsgiconfig.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/uwsgi.c b/uwsgi.c index 9baec0e1..2f788541 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -1542,7 +1542,7 @@ int uwsgi_start(void *v_argv) { } if (!getrlimit(RLIMIT_AS, &uwsgi.rl)) { //check for overflow - if (uwsgi.rl.rlim_max != RLIM_INFINITY && !uwsgi.no_initial_output) { + if (uwsgi.rl.rlim_max != (rlim_t) RLIM_INFINITY && !uwsgi.no_initial_output) { uwsgi_log("your process address space limit is %lld bytes (%lld MB)\n", (long long) uwsgi.rl.rlim_max, (long long) uwsgi.rl.rlim_max / 1024 / 1024); } } diff --git a/uwsgiconfig.py b/uwsgiconfig.py index 663ece94..466dc817 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -269,8 +269,11 @@ class uConf(object): print("detected include path: %s" % self.include_path) - gcc_major = int(gcc_version.split('.')[0]) - gcc_minor = int(gcc_version.split('.')[1]) + try: + gcc_major = int(gcc_version.split('.')[0]) + gcc_minor = int(gcc_version.split('.')[1]) + except: + raise Exception("you need a C compiler to build uWSGI") if (sys.version_info[0] == 2) or (gcc_major < 4) or (gcc_major == 4 and gcc_minor < 3): self.cflags = self.cflags + ['-fno-strict-aliasing'] # add -fno-strict-aliasing only on python2 and gcc < 4.3