From d33695435b2fe41513be74add2f221d1a68ebedb Mon Sep 17 00:00:00 2001 From: klondike Date: Sat, 31 Aug 2013 17:47:57 +0200 Subject: [PATCH] Add propper check for stdint.h --- CMakeLists.txt | 1 + src/system.h.in | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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