mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-07 06:06:08 +00:00
fixed ifaddrs support
This commit is contained in:
@@ -325,7 +325,6 @@ char *generate_socket_name(char *socket_name) {
|
||||
|
||||
char *asterisk = strchr(socket_name, '*');
|
||||
|
||||
char *new_socket;
|
||||
char *tcp_port;
|
||||
int i;
|
||||
char *ptr = socket_name;
|
||||
@@ -354,6 +353,10 @@ char *generate_socket_name(char *socket_name) {
|
||||
|
||||
if (asterisk) {
|
||||
|
||||
#ifndef UWSGI_HAS_IFADDRS
|
||||
uwsgi_log("your system does not support ifaddrs subsystem\n");
|
||||
#else
|
||||
char *new_socket;
|
||||
uwsgi_log("generate_socket_name(%s)\n", socket_name);
|
||||
// get all the AF_INET addresses available
|
||||
struct ifaddrs *ifap = NULL, *ifa, *ifaf;
|
||||
@@ -390,6 +393,7 @@ char *generate_socket_name(char *socket_name) {
|
||||
}
|
||||
|
||||
uwsgi_log("unable to find avalid socket address\n");
|
||||
#endif
|
||||
uwsgi_nuclear_blast();
|
||||
}
|
||||
return socket_name;
|
||||
|
||||
@@ -94,7 +94,9 @@
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
#ifdef UWSGI_HAS_IFADDRS
|
||||
#include <ifaddrs.h>
|
||||
#endif
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
|
||||
@@ -240,6 +240,9 @@ class uConf(object):
|
||||
self.cflags.append('-DUWSGI_BUILD_DATE="\\"%s\\""' % time.strftime("%d %B %Y %H:%M:%S"))
|
||||
kvm_list = ['FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFly']
|
||||
|
||||
if os.path.exists('/usr/include/ifaddrs.h') or os.path.exists('/usr/local/include/ifaddrs.h'):
|
||||
self.cflags.append('-DUWSGI_HAS_IFADDRS')
|
||||
|
||||
if uwsgi_os == 'SunOS':
|
||||
self.libs.append('-lsendfile')
|
||||
self.gcc_list.append('lib/sun_fixes')
|
||||
|
||||
Reference in New Issue
Block a user