diff options
author | kientzle <kientzle@FreeBSD.org> | 2009-03-07 00:36:50 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2009-03-07 00:36:50 +0000 |
commit | 2220f2f444ab3d8df6703465d1d98c3bba92c3ef (patch) | |
tree | 410a1841c4f1b8fa59dfa45c482bd7c42c809e2c /lib | |
parent | 86476a54f9bd352811dbacd9857efd23edeb25e3 (diff) | |
download | FreeBSD-src-2220f2f444ab3d8df6703465d1d98c3bba92c3ef.zip FreeBSD-src-2220f2f444ab3d8df6703465d1d98c3bba92c3ef.tar.gz |
Merge r283,r529 from libarchive.googlecode.com: Fix ext2_fs.h includes
for Linux.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libarchive/archive_entry.c | 10 | ||||
-rw-r--r-- | lib/libarchive/archive_write_disk.c | 14 |
2 files changed, 17 insertions, 7 deletions
diff --git a/lib/libarchive/archive_entry.c b/lib/libarchive/archive_entry.c index 095e493..37fc37b 100644 --- a/lib/libarchive/archive_entry.c +++ b/lib/libarchive/archive_entry.c @@ -39,18 +39,22 @@ __FBSDID("$FreeBSD$"); #include <sys/sysmacros.h> #endif #endif -#ifdef HAVE_EXT2FS_EXT2_FS_H -#include <ext2fs/ext2_fs.h> /* for Linux file flags */ -#endif #ifdef HAVE_LIMITS_H #include <limits.h> #endif #ifdef HAVE_LINUX_FS_H #include <linux/fs.h> /* for Linux file flags */ #endif +/* + * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h. + * As the include guards don't agree, the order of include is important. + */ #ifdef HAVE_LINUX_EXT2_FS_H #include <linux/ext2_fs.h> /* for Linux file flags */ #endif +#if defined(HAVE_EXT2FS_EXT2_FS_H) && !defined(__CYGWIN__) +#include <ext2fs/ext2_fs.h> /* for Linux file flags */ +#endif #include <stddef.h> #include <stdio.h> #ifdef HAVE_STDLIB_H diff --git a/lib/libarchive/archive_write_disk.c b/lib/libarchive/archive_write_disk.c index ab43c3f..ea19d5e 100644 --- a/lib/libarchive/archive_write_disk.c +++ b/lib/libarchive/archive_write_disk.c @@ -51,10 +51,6 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_UTIME_H #include <sys/utime.h> #endif - -#ifdef HAVE_EXT2FS_EXT2_FS_H -#include <ext2fs/ext2_fs.h> /* for Linux file flags */ -#endif #ifdef HAVE_ERRNO_H #include <errno.h> #endif @@ -67,6 +63,16 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_LINUX_FS_H #include <linux/fs.h> /* for Linux file flags */ #endif +/* + * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h. + * As the include guards don't agree, the order of include is important. + */ +#ifdef HAVE_LINUX_EXT2_FS_H +#include <linux/ext2_fs.h> /* for Linux file flags */ +#endif +#if defined(HAVE_EXT2FS_EXT2_FS_H) && !defined(__CYGWIN__) +#include <ext2fs/ext2_fs.h> /* Linux file flags, broken on Cygwin */ +#endif #ifdef HAVE_LIMITS_H #include <limits.h> #endif |