SDL: Added <string.h> for declaration of memset() and memcpy()

From e2f35a16c288a922089a75d972274404c5492b74 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 20 Jan 2024 08:34:30 -0800
Subject: [PATCH] Added <string.h> for declaration of memset() and memcpy()

---
 include/SDL3/SDL_stdinc.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/SDL3/SDL_stdinc.h b/include/SDL3/SDL_stdinc.h
index 4cc8480b2f5d..78227f3dad2e 100644
--- a/include/SDL3/SDL_stdinc.h
+++ b/include/SDL3/SDL_stdinc.h
@@ -35,6 +35,7 @@
 #endif
 #include <stdarg.h>
 #include <stdint.h>
+#include <string.h>
 #include <wchar.h>
 
 #ifndef SDL_DISABLE_ALLOCA
@@ -726,27 +727,26 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
 #if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
 
 /* The analyzer knows about strlcpy even when the system doesn't provide it */
-#ifndef HAVE_STRLCPY
+#if !defined(HAVE_STRLCPY) && !defined(strlcpy)
 size_t strlcpy(char* dst, const char* src, size_t size);
 #endif
 
 /* The analyzer knows about strlcat even when the system doesn't provide it */
-#ifndef HAVE_STRLCAT
+#if !defined(HAVE_STRLCAT) && !defined(strlcat)
 size_t strlcat(char* dst, const char* src, size_t size);
 #endif
 
-#ifndef HAVE_WCSLCPY
+#if !defined(HAVE_WCSLCPY) && !defined(wcslcpy)
 size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size);
 #endif
 
-#ifndef HAVE_WCSLCAT
+#if !defined(HAVE_WCSLCAT) && !defined(wcslcat)
 size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size);
 #endif
 
 /* Starting LLVM 16, the analyser errors out if these functions do not have
    their prototype defined (clang-diagnostic-implicit-function-declaration) */
 #include <stdlib.h>
-#include <string.h>
 #include <stdio.h>
 
 #define SDL_malloc malloc