From: Eric Biggers Date: Thu, 22 Nov 2012 05:30:32 +0000 (-0600) Subject: Fix conflict with LIST_HEAD in BSD X-Git-Tag: v1.2.0~11 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=00b7886e84f81cf10d3adc3ab4594ea9ff5d7fc0 Fix conflict with LIST_HEAD in BSD --- 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) {