From e2f35a16c288a922089a75d972274404c5492b74 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 20 Jan 2024 08:34:30 -0800 Subject: [PATCH] Added 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 4cc8480b2f..78227f3dad 100644 --- a/include/SDL3/SDL_stdinc.h +++ b/include/SDL3/SDL_stdinc.h @@ -35,6 +35,7 @@ #endif #include #include +#include #include #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 -#include #include #define SDL_malloc malloc