From 00b7886e84f81cf10d3adc3ab4594ea9ff5d7fc0 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 21 Nov 2012 23:30:32 -0600 Subject: [PATCH 1/1] Fix conflict with LIST_HEAD in BSD --- src/write.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/write.c b/src/write.c index e441b584..29a8f21f 100644 --- a/src/write.c +++ b/src/write.c @@ -25,6 +25,15 @@ * along with wimlib; if not, see http://www.gnu.org/licenses/. */ +#include "config.h" + +#if defined(HAVE_SYS_FILE_H) && defined(HAVE_FLOCK) +/* On BSD, this should be included before "list.h" so that "list.h" can + * overwrite the LIST_HEAD macro. */ +#include +#endif + +#include "list.h" #include "wimlib_internal.h" #include "io.h" #include "dentry.h" @@ -32,13 +41,13 @@ #include "xml.h" #include "lzx.h" #include "xpress.h" -#include #ifdef ENABLE_MULTITHREADED_COMPRESSION #include #include #endif +#include #include #ifdef WITH_NTFS_3G @@ -48,17 +57,12 @@ #include #endif - #ifdef HAVE_ALLOCA_H #include #else #include #endif -#if defined(HAVE_SYS_FILE_H) && defined(HAVE_FLOCK) -#include -#endif - static int do_fflush(FILE *fp) { -- 2.43.0