diff options
Diffstat (limited to 'community/desmume/0002-Define-_POSIX_C_SOURCE-for-clock_gettime.patch')
-rw-r--r-- | community/desmume/0002-Define-_POSIX_C_SOURCE-for-clock_gettime.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/community/desmume/0002-Define-_POSIX_C_SOURCE-for-clock_gettime.patch b/community/desmume/0002-Define-_POSIX_C_SOURCE-for-clock_gettime.patch new file mode 100644 index 00000000000..74b64b322a5 --- /dev/null +++ b/community/desmume/0002-Define-_POSIX_C_SOURCE-for-clock_gettime.patch @@ -0,0 +1,29 @@ +From 39d9a036bc314813faa90fe18c6b6556785a55d8 Mon Sep 17 00:00:00 2001 +From: Luca Weiss <luca@z3ntu.xyz> +Date: Mon, 3 Oct 2022 16:30:01 +0200 +Subject: [PATCH 2/2] Define _POSIX_C_SOURCE for clock_gettime + +clock_gettime is a POSIX extension so it should have _POSIX_C_SOURCE +defined before using it. This fixes the build on musl libc with also +CLOCK_MONOTONIC not being defined. +--- + desmume/src/libretro-common/features/features_cpu.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/desmume/src/libretro-common/features/features_cpu.c b/desmume/src/libretro-common/features/features_cpu.c +index 0980821f..0b85bfa6 100644 +--- a/desmume/src/libretro-common/features/features_cpu.c ++++ b/desmume/src/libretro-common/features/features_cpu.c +@@ -26,6 +26,9 @@ + #if defined(_WIN32) + #include <direct.h> + #else ++#ifndef _POSIX_C_SOURCE ++#define _POSIX_C_SOURCE 199309L ++#endif + #include <unistd.h> + #endif + +-- +2.37.3 + |