diff --git a/CMakeLists.txt b/CMakeLists.txt index 384ab38..1b4f6d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,7 @@ if (MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS) endif() +check_include_file(stdint.h HAVE_STDINT_H) check_include_file(sys/types.h HAVE_SYS_TYPES_H) if (HAVE_SYS_TYPES_H) set (CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} "sys/types.h") diff --git a/src/system.h.in b/src/system.h.in index 49a7616..dce1892 100644 --- a/src/system.h.in +++ b/src/system.h.in @@ -61,7 +61,8 @@ #include #include -#ifndef __sun__ +#cmakedefine HAVE_STDINT_H +#ifdef HAVE_STDINT_H #include #endif