From dcefe95ae46196ffd1a2f0e3a3688e5119dd9d8d Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 1 Sep 2025 23:19:35 -0700 Subject: [PATCH] Configure SDL assuming we, in fact, have a libc. Without this, on Linux and Linux alone, and only if SDL is builtin, the definitions for some functions - notably, memset/memcpy - are taken from SDL source. This leaves them at the mercy of the compiler and may lead to the optimal implementations of these functions not being selected. But the main motivation for this is that it's action at a distance that is incredibly surprising - linking in a gamepad support library should not change the implementation of memset/memcpy! --- drivers/sdl/SDL_build_config_private.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/sdl/SDL_build_config_private.h b/drivers/sdl/SDL_build_config_private.h index 7c18933e13f..ed0cc09c5ba 100644 --- a/drivers/sdl/SDL_build_config_private.h +++ b/drivers/sdl/SDL_build_config_private.h @@ -81,6 +81,7 @@ #define SDL_PLATFORM_UNIX 1 #define HAVE_STDIO_H 1 +#define HAVE_LIBC 1 #define HAVE_LINUX_INPUT_H 1 #define HAVE_POLL 1