]> wimlib.net Git - wimlib/blobdiff - src/write.c
Fix conflict with LIST_HEAD in BSD
[wimlib] / src / write.c
index e441b58444f6982bdeb41926a8402249326cd6a1..29a8f21f0acc5be377f0c8b72bf4736a82c604b0 100644 (file)
  * 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 <sys/file.h>
+#endif
+
+#include "list.h"
 #include "wimlib_internal.h"
 #include "io.h"
 #include "dentry.h"
 #include "xml.h"
 #include "lzx.h"
 #include "xpress.h"
-#include <unistd.h>
 
 #ifdef ENABLE_MULTITHREADED_COMPRESSION
 #include <semaphore.h>
 #include <pthread.h>
 #endif
 
+#include <unistd.h>
 #include <errno.h>
 
 #ifdef WITH_NTFS_3G
 #include <ntfs-3g/dir.h>
 #endif
 
-
 #ifdef HAVE_ALLOCA_H
 #include <alloca.h>
 #else
 #include <stdlib.h>
 #endif
 
-#if defined(HAVE_SYS_FILE_H) && defined(HAVE_FLOCK)
-#include <sys/file.h>
-#endif
-
 
 static int do_fflush(FILE *fp)
 {