Add propper check for stdint.h

This commit is contained in:
klondike 2013-08-31 17:47:57 +02:00 committed by Jan Vidar Krey
parent bfdf707490
commit d33695435b
2 changed files with 3 additions and 1 deletions

View File

@ -64,6 +64,7 @@ if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif() endif()
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(sys/types.h HAVE_SYS_TYPES_H) check_include_file(sys/types.h HAVE_SYS_TYPES_H)
if (HAVE_SYS_TYPES_H) if (HAVE_SYS_TYPES_H)
set (CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} "sys/types.h") set (CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} "sys/types.h")

View File

@ -61,7 +61,8 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#ifndef __sun__ #cmakedefine HAVE_STDINT_H
#ifdef HAVE_STDINT_H
#include <stdint.h> #include <stdint.h>
#endif #endif