diff options
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/ffts_internal.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b85fb1..63e636f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,12 +39,17 @@ include(CMakePushCheckState) add_definitions(-DFFTS_CMAKE_GENERATED) # check existence of various headers +check_include_file(malloc.h HAVE_MALLOC_H) check_include_file(stdint.h HAVE_STDINT_H) check_include_file(stdlib.h HAVE_STDLIB_H) check_include_file(string.h HAVE_STRING_H) check_include_file(sys/mman.h HAVE_SYS_MMAN_H) check_include_file(unistd.h HAVE_UNISTD_H) +if(HAVE_MALLOC_H) + add_definitions(-DHAVE_MALLOC_H) +endif(HAVE_MALLOC_H) + if(HAVE_STDINT_H) add_definitions(-DHAVE_STDINT_H) endif(HAVE_STDINT_H) diff --git a/src/ffts_internal.h b/src/ffts_internal.h index 14d037d..30e814b 100644 --- a/src/ffts_internal.h +++ b/src/ffts_internal.h @@ -38,7 +38,10 @@ #include "ffts_attributes.h" #include "types.h" +#ifdef HAVE_MALLOC_H #include <malloc.h> +#endif + #include <stddef.h> #ifdef HAVE_STDINT_H |