mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-06-16 02:15:48 +00:00
Fix compilation with solaris 11
Based on original patch from Nathan Tamblyn. Fix #831
This commit is contained in:
+2
-1
@@ -396,9 +396,10 @@ static int uwsgi_hook_chown2(char *arg) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef __sun__
|
||||
#if defined(UWSGI_SUNOS_EXTERN_SETHOSTNAME)
|
||||
extern int sethostname(char *, int);
|
||||
#endif
|
||||
|
||||
static int uwsgi_hook_hostname(char *arg) {
|
||||
#ifdef __CYGWIN__
|
||||
return -1;
|
||||
|
||||
+6
-1
@@ -810,7 +810,12 @@ class uConf(object):
|
||||
self.libs.append('-lsendfile')
|
||||
self.libs.append('-lrt')
|
||||
self.gcc_list.append('lib/sun_fixes')
|
||||
self.ldflags.append('-L/lib')
|
||||
sunos_major = int(uwsgi_os_k.split('.')[0])
|
||||
sunos_minor = int(uwsgi_os_k.split('.')[1])
|
||||
# solaris < 11 does not have sethostname declared in unistd
|
||||
if not (sunos_major == 5 and sunos_minor > 10):
|
||||
self.cflags.append('-DUWSGI_SUNOS_EXTERN_SETHOSTNAME')
|
||||
self.ldflags.append('-L/lib')
|
||||
if not uwsgi_os_v.startswith('Nexenta'):
|
||||
self.libs.remove('-rdynamic')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user