summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmlibarchive/CMakeLists.txt')
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 8c10b21..6472ec5 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -415,8 +415,12 @@ CHECK_SYMBOL_EXISTS(strerror_r "string.h" HAVE_STRERROR_R)
CHECK_SYMBOL_EXISTS(strftime "time.h" HAVE_STRFTIME)
CHECK_SYMBOL_EXISTS(vprintf "stdio.h" HAVE_VPRINTF)
-CHECK_SYMBOL_EXISTS(major "sys/mkdev.h" MAJOR_IN_MKDEV)
-CHECK_SYMBOL_EXISTS(major "sys/sysmacros.h" MAJOR_IN_SYSMACROS)
+CHECK_C_SOURCE_COMPILES(
+ "#include <sys/mkdev.h>\nint main() { return major(256); }"
+ MAJOR_IN_MKDEV)
+CHECK_C_SOURCE_COMPILES(
+ "#include <sys/sysmacros.h>\nint main() { return major(256); }"
+ MAJOR_IN_SYSMACROS)
IF(HAVE_STRERROR_R)
SET(HAVE_DECL_STRERROR_R 1)