summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-04-26 21:11:48 (GMT)
committerBrad King <brad.king@kitware.com>2005-04-26 21:11:48 (GMT)
commitc6e15f5ddfd707e5df890695a0bfe4d142c6d18f (patch)
tree6335cecb6b4bb066496b3a8a1049f25bfd174607
parentd6d91ac89f9bce50c85cb72208e7dba64927332b (diff)
downloadCMake-c6e15f5ddfd707e5df890695a0bfe4d142c6d18f.zip
CMake-c6e15f5ddfd707e5df890695a0bfe4d142c6d18f.tar.gz
CMake-c6e15f5ddfd707e5df890695a0bfe4d142c6d18f.tar.bz2
BUG: Fix try-compile for sys/prctl.h. It needs to include sys/types.h first according to the man page.
-rw-r--r--Modules/CMakeBackwardCompatibilityC.cmake4
-rw-r--r--Modules/FindThreads.cmake3
2 files changed, 5 insertions, 2 deletions
diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake
index c9dbce1..90dfbfc 100644
--- a/Modules/CMakeBackwardCompatibilityC.cmake
+++ b/Modules/CMakeBackwardCompatibilityC.cmake
@@ -21,9 +21,11 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
INCLUDE (CheckIncludeFile)
CHECK_INCLUDE_FILE("limits.h" CMAKE_HAVE_LIMITS_H)
CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H)
- CHECK_INCLUDE_FILE("sys/prctl.h" CMAKE_HAVE_SYS_PRCTL_H)
CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H)
+ INCLUDE (CheckIncludeFiles)
+ CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SYS_PRCTL_H)
+
INCLUDE (TestBigEndian)
TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN)
INCLUDE (FindX11)
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index e0bc480..af2801b 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -7,11 +7,12 @@
# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads
INCLUDE (CheckIncludeFile)
+INCLUDE (CheckIncludeFiles)
INCLUDE (CheckLibraryExists)
# Do we have sproc?
IF(CMAKE_SYSTEM MATCHES IRIX)
- CHECK_INCLUDE_FILE("sys/prctl.h" CMAKE_HAVE_SPROC_H)
+ CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H)
ENDIF(CMAKE_SYSTEM MATCHES IRIX)
IF(CMAKE_HAVE_SPROC_H)