Skip to content

Commit

Permalink
libretro: So apparently, _XOPEN_SOURCE has to be at the top of the fi…
Browse files Browse the repository at this point in the history
…le. Hopefully this makes both GCC14 users and Mac users happy. (Related to commit 779606e. Based on PR #793.)
  • Loading branch information
rogerman committed Jun 8, 2024
1 parent 779606e commit 6309a9c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion desmume/src/libretro-common/file/file_path.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdlib.h>
#include <boolean.h>
#include <string.h>
Expand All @@ -31,7 +37,6 @@
#include <file/file_path.h>

#ifndef __MACH__
#define _XOPEN_SOURCE 500 /* For strdup, realpath */
#include <compat/strl.h>
#include <compat/posix_string.h>
#endif
Expand Down

0 comments on commit 6309a9c

Please sign in to comment.