Skip to content

Commit

Permalink
libretro-common: get strlcpy declarations on macOS
Browse files Browse the repository at this point in the history
Defining _XOPEN_SOURCE here disabled the BSD extended string functions
on macOS. Define _DARWIN_C_SOURCE instead on that platform.
  • Loading branch information
atsampson committed May 13, 2024
1 parent 90d0abd commit 6f64f9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions desmume/src/libretro-common/file/file_path.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
* 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>
Expand Down

0 comments on commit 6f64f9a

Please sign in to comment.