SDL: Fixed Android warnings

From ce65f84fd885c1e6a9294219622b11f3f4e827bb Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 4 Jun 2024 16:38:11 -0700
Subject: [PATCH] Fixed Android warnings

---
 src/SDL.c                 |  6 +++---
 src/events/SDL_mouse.c    |  2 +-
 src/stdlib/SDL_getenv.c   |  2 ++
 src/stdlib/SDL_getenv_c.h | 23 +++++++++++++++++++++++
 4 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644 src/stdlib/SDL_getenv_c.h

diff --git a/src/SDL.c b/src/SDL.c
index a784810d51ea2..d1bf69ff1d85b 100644
--- a/src/SDL.c
+++ b/src/SDL.c
@@ -41,14 +41,15 @@
 #include "SDL_log_c.h"
 #include "SDL_properties_c.h"
 #include "audio/SDL_sysaudio.h"
+#include "camera/SDL_camera_c.h"
 #include "cpuinfo/SDL_cpuinfo_c.h"
-#include "video/SDL_video_c.h"
 #include "events/SDL_events_c.h"
 #include "haptic/SDL_haptic_c.h"
 #include "joystick/SDL_gamepad_c.h"
 #include "joystick/SDL_joystick_c.h"
 #include "sensor/SDL_sensor_c.h"
-#include "camera/SDL_camera_c.h"
+#include "stdlib/SDL_getenv_c.h"
+#include "video/SDL_video_c.h"
 
 #define SDL_INIT_EVERYTHING ~0U
 
@@ -58,7 +59,6 @@
 extern int SDL_HelperWindowCreate(void);
 extern int SDL_HelperWindowDestroy(void);
 #endif
-extern void SDL_FreeEnvironmentMemory(void);
 
 #ifdef SDL_BUILD_MAJOR_VERSION
 SDL_COMPILE_TIME_ASSERT(SDL_BUILD_MAJOR_VERSION,
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index f550ab9cbc13b..832173cd73e0b 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -404,7 +404,7 @@ SDL_Mouse *SDL_GetMouse(void)
     return &SDL_mouse;
 }
 
-SDL_MouseButtonFlags SDL_GetMouseButtonState(SDL_Mouse *mouse, SDL_MouseID mouseID, SDL_bool include_touch)
+static SDL_MouseButtonFlags SDL_GetMouseButtonState(SDL_Mouse *mouse, SDL_MouseID mouseID, SDL_bool include_touch)
 {
     int i;
     SDL_MouseButtonFlags buttonstate = 0;
diff --git a/src/stdlib/SDL_getenv.c b/src/stdlib/SDL_getenv.c
index 874cc1da6f7a7..4bcab40eceed9 100644
--- a/src/stdlib/SDL_getenv.c
+++ b/src/stdlib/SDL_getenv.c
@@ -20,6 +20,8 @@
 */
 #include "SDL_internal.h"
 
+#include "SDL_getenv_c.h"
+
 #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
 #include "../core/windows/SDL_windows.h"
 #endif
diff --git a/src/stdlib/SDL_getenv_c.h b/src/stdlib/SDL_getenv_c.h
new file mode 100644
index 0000000000000..2001077346ffb
--- /dev/null
+++ b/src/stdlib/SDL_getenv_c.h
@@ -0,0 +1,23 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+#include "SDL_internal.h"
+
+extern void SDL_FreeEnvironmentMemory(void);