Просмотр исходного кода

Fix clang-tidy error on LLVM 16.

Starting LLVM 16, clang-diagnostic-implicit-function-declaration is
treated as an error.
Pierre Wendling 3 лет назад
Родитель
Сommit
ea093378a2
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      include/SDL3/SDL_stdinc.h

+ 5 - 0
include/SDL3/SDL_stdinc.h

@@ -690,6 +690,11 @@ size_t strlcpy(char* dst, const char* src, size_t size);
 size_t strlcat(char* dst, const char* 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>
+
 #define SDL_malloc malloc
 #define SDL_calloc calloc
 #define SDL_realloc realloc