From add7e2ee0e927eca0878652f5f87767cc3bf400f Mon Sep 17 00:00:00 2001 From: "roberto@freebsd9" Date: Thu, 5 Apr 2012 12:28:10 +0200 Subject: added execinfo support for FreeBSD --- uwsgi.c | 2 +- uwsgiconfig.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/uwsgi.c b/uwsgi.c index 674d7402..03757773 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -1104,7 +1104,7 @@ void uwsgi_plugins_atexit(void) { void uwsgi_backtrace(int depth) { -#if defined(__linux__) || defined(__APPLE__) +#if defined(__linux__) || defined(__APPLE__) || defined(UWSGI_HAS_EXECINFO) #include diff --git a/uwsgiconfig.py b/uwsgiconfig.py index 3954b1b0..49861f16 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -383,6 +383,11 @@ class uConf(object): if self.has_include('ifaddrs.h'): self.cflags.append('-DUWSGI_HAS_IFADDRS') + if uwsgi_os == 'FreeBSD': + if self.has_include('execinfo.h') or os.path.exists('/usr/local/include/execinfo.h'): + self.cflags.append('-DUWSGI_HAS_EXECINFO') + self.libs.append('-lexecinfo') + if uwsgi_os == 'SunOS': self.libs.append('-lsendfile') self.gcc_list.append('lib/sun_fixes') -- cgit v1.2.1