cmake: define HAVE_MALLOC_H when malloc.h is found

This commit is contained in:
Anonymous Maarten
2024-12-25 02:10:53 +01:00
parent b2178857dc
commit bed16f77d1

View File

@@ -937,7 +937,7 @@ endif()
set(SDL_DISABLE_ALLOCA 0)
check_include_file("alloca.h" "HAVE_ALLOCA_H")
if(MSVC)
check_include_file("malloc.h" "HAVE_MALLOC")
check_include_file("malloc.h" "HAVE_MALLOC_H")
check_symbol_exists("_alloca" "malloc.h" _ALLOCA_IN_MALLOC_H)
if(NOT HAVE_ALLOCA_H AND NOT _ALLOCA_IN_MALLOC_H)
set(SDL_DISABLE_ALLOCA 1)