Skip to content

Commit 2b3ab76

Browse files
committed
don't prototype strdup() for __clang_analyzer__ case in windows builds.
Fixes: #12948.
1 parent 15c6acf commit 2b3ab76

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/SDL3/SDL_stdinc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5974,8 +5974,10 @@ size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size);
59745974
size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size);
59755975
#endif
59765976

5977+
#ifndef _WIN32
59775978
/* strdup is not ANSI but POSIX, and its prototype might be hidden... */
59785979
char *strdup(const char *str);
5980+
#endif
59795981

59805982
/* Starting LLVM 16, the analyser errors out if these functions do not have
59815983
their prototype defined (clang-diagnostic-implicit-function-declaration) */

0 commit comments

Comments
 (0)