1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: check if malloc.h is present, independently of function malloc_trim

This commit is contained in:
Sébastien Helleu
2024-03-06 23:09:00 +01:00
parent 70828a7dd1
commit cb6ecb6818
3 changed files with 4 additions and 1 deletions
+2
View File
@@ -192,7 +192,9 @@ include(CheckSymbolExists)
check_include_files("langinfo.h" HAVE_LANGINFO_CODESET)
check_include_files("sys/resource.h" HAVE_SYS_RESOURCE_H)
check_include_files("malloc.h" HAVE_MALLOC_H)
check_symbol_exists("malloc_trim" "malloc.h" HAVE_MALLOC_TRIM)
check_function_exists(mallinfo HAVE_MALLINFO)
check_function_exists(mallinfo2 HAVE_MALLINFO2)
+1
View File
@@ -5,6 +5,7 @@
#cmakedefine ICONV_2ARG_IS_CONST 1
#cmakedefine HAVE_MALLINFO
#cmakedefine HAVE_MALLINFO2
#cmakedefine HAVE_MALLOC_H
#cmakedefine HAVE_MALLOC_TRIM
#cmakedefine HAVE_EAT_NEWLINE_GLITCH
#cmakedefine HAVE_ASPELL_VERSION_STRING
+1 -1
View File
@@ -40,7 +40,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#ifdef HAVE_MALLOC_TRIM
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif