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

main
Sam Lantinga 2024-01-20 08:34:30 -08:00
parent 7a069cc4b0
commit e2f35a16c2
1 changed files with 5 additions and 5 deletions

View File

@ -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