Date: Sun, 8 Mar 2009 05:28:52 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r189516 - head/usr.bin/tar Message-ID: <200903080528.n285SqR0073182@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kientzle Date: Sun Mar 8 05:28:52 2009 New Revision: 189516 URL: http://svn.freebsd.org/changeset/base/189516 Log: Merge r529 from libarchive.googlecode.com: Fix how we read ext2fs_fs.h headers on Linux. Modified: head/usr.bin/tar/write.c Modified: head/usr.bin/tar/write.c ============================================================================== --- head/usr.bin/tar/write.c Sun Mar 8 05:24:37 2009 (r189515) +++ head/usr.bin/tar/write.c Sun Mar 8 05:28:52 2009 (r189516) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903080528.n285SqR0073182>