summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroberto@freebsd9 <roberto@freebsd9>2012-04-05 12:28:10 +0200
committerroberto@freebsd9 <roberto@freebsd9>2012-04-05 12:28:10 +0200
commitadd7e2ee0e927eca0878652f5f87767cc3bf400f (patch)
tree55cf9a042c13b5df42389475259491b8d9e8c52a
parent9ff6be783a2d73e9139bbd146c7fe600e5994cd6 (diff)
downloaduwsgi-add7e2ee0e927eca0878652f5f87767cc3bf400f.tar.gz
added execinfo support for FreeBSD
-rw-r--r--uwsgi.c2
-rw-r--r--uwsgiconfig.py5
2 files changed, 6 insertions, 1 deletions
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 <execinfo.h>
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')