From d7ef7e9416e4fd758c4777d63aeb0ee1a40d87d2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 5 Nov 2009 16:29:21 -0500 Subject: libarchive: Add try-compile for 'major' The commit "Fix libarchive linker errors on SunOS for mkdev/major/minor" hard-coded #include lines for getting mkdev/major/minor on the Sun. Instead we add missing try-compile tests to make sure the proper headers get included through the standard mechanism. --- Utilities/cmlibarchive/CMakeLists.txt | 3 +++ Utilities/cmlibarchive/libarchive/archive_entry.c | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt index 2c23105..636ca14 100644 --- a/Utilities/cmlibarchive/CMakeLists.txt +++ b/Utilities/cmlibarchive/CMakeLists.txt @@ -406,6 +406,9 @@ 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) + IF(HAVE_STRERROR_R) SET(HAVE_DECL_STRERROR_R 1) ENDIF(HAVE_STRERROR_R) diff --git a/Utilities/cmlibarchive/libarchive/archive_entry.c b/Utilities/cmlibarchive/libarchive/archive_entry.c index ce45565..d75dde5 100644 --- a/Utilities/cmlibarchive/libarchive/archive_entry.c +++ b/Utilities/cmlibarchive/libarchive/archive_entry.c @@ -29,10 +29,6 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.55 2008/12/23 05:01:4 #ifdef HAVE_SYS_STAT_H #include #endif -#if defined(__sun) || defined(_AIX) -#include -#include -#endif #ifdef HAVE_SYS_TYPES_H #include #endif -- cgit v0.12