Date: Sat, 7 Mar 2009 00:36:50 +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: r189465 - head/lib/libarchive Message-ID: <200903070036.n270ao7G033172@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kientzle Date: Sat Mar 7 00:36:50 2009 New Revision: 189465 URL: http://svn.freebsd.org/changeset/base/189465 Log: Merge r283,r529 from libarchive.googlecode.com: Fix ext2_fs.h includes for Linux. Modified: head/lib/libarchive/archive_entry.c head/lib/libarchive/archive_write_disk.c Modified: head/lib/libarchive/archive_entry.c ============================================================================== --- head/lib/libarchive/archive_entry.c Sat Mar 7 00:25:33 2009 (r189464) +++ head/lib/libarchive/archive_entry.c Sat Mar 7 00:36:50 2009 (r189465) @@ -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 Modified: head/lib/libarchive/archive_write_disk.c ============================================================================== --- head/lib/libarchive/archive_write_disk.c Sat Mar 7 00:25:33 2009 (r189464) +++ head/lib/libarchive/archive_write_disk.c Sat Mar 7 00:36:50 2009 (r189465) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903070036.n270ao7G033172>