diff --git a/Utilities/cmtar/CMakeLists.txt b/Utilities/cmtar/CMakeLists.txt index a56fc8407..39910a56a 100644 --- a/Utilities/cmtar/CMakeLists.txt +++ b/Utilities/cmtar/CMakeLists.txt @@ -236,7 +236,25 @@ SET (HAVE_LIBZ 1) #SET (HAVE_UNISTD_H 1) SET (MAJOR_IN_MKDEV 0) SET (MAJOR_IN_SYSMACROS 0) -SET (MAKEDEV_THREE_ARGS 0) + +SET(CMAKE_MAKEDEV_SOURCE) +FOREACH(FILE ${HEADER_INCLUDES}) + SET(CMAKE_MAKEDEV_SOURCE + "${CMAKE_MAKEDEV_SOURCE}#include <${FILE}>\n") +ENDFOREACH(FILE) +SET(CMAKE_MAKEDEV_SOURCE + "${CMAKE_MAKEDEV_SOURCE} +int main () +{ + major_t maj = 5; + minor_t min = 7; + makedev(0, maj, min); + return 0; +} +") +INCLUDE(CheckCSourceCompiles) +CHECK_C_SOURCE_COMPILES("${CMAKE_MAKEDEV_SOURCE}" MAKEDEV_THREE_ARGS) +#SET (MAKEDEV_THREE_ARGS 0) #SET (NEED_BASENAME 0) #SET (NEED_DIRNAME 0) #SET (NEED_FNMATCH 1)