From 97529ade6e4f3def593dae1225964775ccd0943f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 4 Dec 2017 02:48:08 +0100 Subject: [PATCH] OSX PowerPC might not define O_CLOEXEC --- libretro-common/file/nbio/nbio_unixmmap.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libretro-common/file/nbio/nbio_unixmmap.c b/libretro-common/file/nbio/nbio_unixmmap.c index 40703ae138..80325da393 100644 --- a/libretro-common/file/nbio/nbio_unixmmap.c +++ b/libretro-common/file/nbio/nbio_unixmmap.c @@ -39,6 +39,20 @@ #include #include +#ifdef __APPLE__ + +#ifndef O_CLOEXEC +#define O_CLOEXEC 0x1000000 +#endif + +#else + +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + +#endif + struct nbio_mmap_unix_t { int fd;