diff options
author | kientzle <kientzle@FreeBSD.org> | 2009-03-08 05:28:52 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2009-03-08 05:28:52 +0000 |
commit | 65c5348f797c88ffca7591fa16eeeb6ec56a679f (patch) | |
tree | 53969f115d2dd3e1bee84b0cb3f03929b26418e5 /usr.bin/tar/write.c | |
parent | 70eb245d1ef15137d9db06deeeba8ed74989d096 (diff) | |
download | FreeBSD-src-65c5348f797c88ffca7591fa16eeeb6ec56a679f.zip FreeBSD-src-65c5348f797c88ffca7591fa16eeeb6ec56a679f.tar.gz |
Merge r529 from libarchive.googlecode.com: Fix how we read ext2fs_fs.h
headers on Linux.
Diffstat (limited to 'usr.bin/tar/write.c')
-rw-r--r-- | usr.bin/tar/write.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index 682a3e5..b64de18 100644 --- a/usr.bin/tar/write.c +++ b/usr.bin/tar/write.c @@ -44,10 +44,6 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include <errno.h> #endif -#if defined(HAVE_EXT2FS_EXT2_FS_H) && !defined(__CYGWIN__) -/* This header exists but is broken on Cygwin. */ -#include <ext2fs/ext2_fs.h> -#endif #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif @@ -63,6 +59,17 @@ __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__) +/* This header exists but is broken on Cygwin. */ +#include <ext2fs/ext2_fs.h> +#endif #ifdef HAVE_PWD_H #include <pwd.h> #endif |