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