]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix build failure on msys.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 4 Feb 2010 01:30:44 +0000 (20:30 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 4 Feb 2010 01:30:44 +0000 (20:30 -0500)
SVN-Revision: 1865

libarchive/archive_read_disk_entry_from_file.c
libarchive/test/test_sparse_basic.c

index 8e1dfdb281de7a98caf2269decbe542729e9e535..c48be83be0314657c37bb913e304017ade9d7f80 100644 (file)
@@ -744,6 +744,13 @@ exit_setup_sparse:
 /*
  * Windows sparse interface.
  */
+#if defined(__MINGW32__) && !defined(FSCTL_QUERY_ALLOCATED_RANGES)
+#define FSCTL_QUERY_ALLOCATED_RANGES 0x940CF
+typedef struct {
+       LARGE_INTEGER FileOffset;
+       LARGE_INTEGER Length;
+} FILE_ALLOCATED_RANGE_BUFFER;
+#endif
 
 static int
 setup_sparse(struct archive_read_disk *a,
index 56c16de68d52d27a3d6c1a56261c468696a4a139..16f2cf30c050727853c80b9b97e4009ec9bb3233 100644 (file)
@@ -53,12 +53,14 @@ struct sparse {
 };
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
-
+#include <winioctl.h>
 /*
  * Create a sparse file on Windows.
  */
 
+#if !defined(PATH_MAX)
 #define        PATH_MAX        MAX_PATH
+#endif
 #if !defined(__BORLANDC__)
 #define getcwd _getcwd
 #endif