From 8b29aaddbd58490d6944118f84b5c7b852445907 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 12 Nov 2020 14:34:11 -0800 Subject: [PATCH] Fixed warning when building on Windows --- src/stdlib/SDL_stdlib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/stdlib/SDL_stdlib.c b/src/stdlib/SDL_stdlib.c index 8d9707e78..5334a512d 100644 --- a/src/stdlib/SDL_stdlib.c +++ b/src/stdlib/SDL_stdlib.c @@ -488,6 +488,9 @@ __declspec(selectany) int _fltused = 1; /* The optimizer on Visual Studio 2005 and later generates memcpy() and memset() calls */ #if _MSC_VER >= 1400 +extern void *memcpy(void* dst, const void* src, size_t len); +#pragma intrinsic(memcpy) + #pragma function(memcpy) void * memcpy(void *dst, const void *src, size_t len) @@ -495,13 +498,16 @@ memcpy(void *dst, const void *src, size_t len) return SDL_memcpy(dst, src, len); } +extern void *memset(void* dst, int c, size_t len); +#pragma intrinsic(memset) + #pragma function(memset) void * memset(void *dst, int c, size_t len) { return SDL_memset(dst, c, len); } -#endif +#endif /* _MSC_VER >= 1400 */ #ifdef _M_IX86