summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-01-04 14:37:54 (GMT)
committerBrad King <brad.king@kitware.com>2012-01-04 14:39:28 (GMT)
commitb6ca96ec95145b453790f519abbbae91cd6c9771 (patch)
tree67ad66d4f5d464246673f6c1652b87503c7cf522 /Utilities/cmlibarchive
parentf293b73d71c5dbbf053a864b2c2f285ef0834630 (diff)
downloadCMake-b6ca96ec95145b453790f519abbbae91cd6c9771.zip
CMake-b6ca96ec95145b453790f519abbbae91cd6c9771.tar.gz
CMake-b6ca96ec95145b453790f519abbbae91cd6c9771.tar.bz2
libarchive: Include linux/types.h before linux/fiemap.h
Some Linux API versions do not perform this inclusion automatically, so types like __u64 needed by the latter are not available.
Diffstat (limited to 'Utilities/cmlibarchive')
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt1
-rw-r--r--Utilities/cmlibarchive/build/cmake/config.h.in3
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read_disk_entry_from_file.c3
3 files changed, 7 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 2352693..a24bb5d 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -250,6 +250,7 @@ LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H)
LA_CHECK_INCLUDE_FILE("langinfo.h" HAVE_LANGINFO_H)
LA_CHECK_INCLUDE_FILE("limits.h" HAVE_LIMITS_H)
+LA_CHECK_INCLUDE_FILE("linux/types.h" HAVE_LINUX_TYPES_H)
LA_CHECK_INCLUDE_FILE("linux/fiemap.h" HAVE_LINUX_FIEMAP_H)
LA_CHECK_INCLUDE_FILE("linux/fs.h" HAVE_LINUX_FS_H)
LA_CHECK_INCLUDE_FILE("linux/magic.h" HAVE_LINUX_MAGIC_H)
diff --git a/Utilities/cmlibarchive/build/cmake/config.h.in b/Utilities/cmlibarchive/build/cmake/config.h.in
index 71a7801..ff97cbd 100644
--- a/Utilities/cmlibarchive/build/cmake/config.h.in
+++ b/Utilities/cmlibarchive/build/cmake/config.h.in
@@ -603,6 +603,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `link' function. */
#cmakedefine HAVE_LINK 1
+/* Define to 1 if you have the <linux/types.h> header file. */
+#cmakedefine HAVE_LINUX_TYPES_H 1
+
/* Define to 1 if you have the <linux/fiemap.h> header file. */
#cmakedefine HAVE_LINUX_FIEMAP_H 1
diff --git a/Utilities/cmlibarchive/libarchive/archive_read_disk_entry_from_file.c b/Utilities/cmlibarchive/libarchive/archive_read_disk_entry_from_file.c
index 8ce88b3..fdeb516 100644
--- a/Utilities/cmlibarchive/libarchive/archive_read_disk_entry_from_file.c
+++ b/Utilities/cmlibarchive/libarchive/archive_read_disk_entry_from_file.c
@@ -73,6 +73,9 @@ __FBSDID("$FreeBSD: head/lib/libarchive/archive_read_disk_entry_from_file.c 2010
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
+#ifdef HAVE_LINUX_TYPES_H
+#include <linux/types.h>
+#endif
#ifdef HAVE_LINUX_FIEMAP_H
#include <linux/fiemap.h>
#endif