From afcb3e1001f9d3b28f95ab1ef67e9118ee6b81e3 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Mon, 27 Oct 2014 11:48:16 +0100 Subject: [PATCH 1/2] Fixup pty compilation on hurd / dragonflybsd Fix #756 --- plugins/pty/pty.c | 6 +++--- plugins/pty/uwsgiplugin.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/pty/pty.c b/plugins/pty/pty.c index a90965d5..db74b3a6 100644 --- a/plugins/pty/pty.c +++ b/plugins/pty/pty.c @@ -1,12 +1,12 @@ #include -#if defined(__linux__) || defined(__GNU_kFreeBSD__) +#if defined(__linux__) || defined(__GNU_kFreeBSD__) || defined(__HURD__) #include #elif defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) #include -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__DragonFly__) #include #endif -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__DragonFly__) #include #endif diff --git a/plugins/pty/uwsgiplugin.py b/plugins/pty/uwsgiplugin.py index a4aba6c8..dbc2b23f 100644 --- a/plugins/pty/uwsgiplugin.py +++ b/plugins/pty/uwsgiplugin.py @@ -5,7 +5,7 @@ uwsgi_os = os.uname()[0] CFLAGS = [] LDFLAGS = [] -if uwsgi_os in ('Linux', 'FreeBSD'): +if uwsgi_os in ('Linux', 'FreeBSD', 'GNU', 'NetBSD', 'DragonFly'): LIBS = ['-lutil'] else: LIBS = [] From ca8ab125b43995c42714227b3ab065990eae4411 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Mon, 27 Oct 2014 11:51:07 +0100 Subject: [PATCH 2/2] Fixup forkpty ifdefery for dragonfly / freebsd They are negated so we should AND them --- plugins/forkptyrouter/forkptyrouter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/forkptyrouter/forkptyrouter.c b/plugins/forkptyrouter/forkptyrouter.c index 88ca3d90..01f2918e 100644 --- a/plugins/forkptyrouter/forkptyrouter.c +++ b/plugins/forkptyrouter/forkptyrouter.c @@ -23,7 +23,7 @@ extern struct uwsgi_server uwsgi; #elif defined(__FreeBSD__) || defined(__DragonFly__) #include #endif -#if !defined(__FreeBSD__) || !defined(__DragonFly__) +#if !defined(__FreeBSD__) && !defined(__DragonFly__) #include #endif