diff --git a/desmume/src/libretro-common/file/file_path.c b/desmume/src/libretro-common/file/file_path.c index 8836538b7..21e7f1e51 100644 --- a/desmume/src/libretro-common/file/file_path.c +++ b/desmume/src/libretro-common/file/file_path.c @@ -20,6 +20,12 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifdef __MACH__ +#define _DARWIN_C_SOURCE /* As below, plus strl* functions */ +#else +#define _XOPEN_SOURCE 500 /* For strdup, realpath */ +#endif + #include #include #include @@ -31,7 +37,6 @@ #include #ifndef __MACH__ -#define _XOPEN_SOURCE 500 /* For strdup, realpath */ #include #include #endif