From 8954520cb98766e4d27f39bd4e794ce9f1eed26c Mon Sep 17 00:00:00 2001 From: unbit Date: Sun, 8 Sep 2013 12:47:07 +0200 Subject: [PATCH] hardcode support for MS_REC --- core/mount.c | 7 +++++++ uwsgi.h | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/core/mount.c b/core/mount.c index dc848fbd..acee0f06 100644 --- a/core/mount.c +++ b/core/mount.c @@ -12,6 +12,12 @@ */ +#ifdef __linux__ +#ifndef MS_REC +#define MS_REC 16384 +#endif +#endif + struct uwsgi_mount_flag { char *key; uint64_t value; @@ -96,6 +102,7 @@ parsed: #ifdef __linux__ return mount(what, where, fs, mountflags, NULL); #elif defined(__FreeBSD__) + return mount(fs, where, (int) mountflags, what); #endif return -1; } diff --git a/uwsgi.h b/uwsgi.h index 64c0ba92..7760153a 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -233,7 +233,13 @@ extern "C" { #include #include #include +#endif + +#if defined(__linux) || defined(__FreeBSD__) #include +#endif + +#ifdef __linux__ extern int pivot_root(const char *new_root, const char *put_old); #endif