patch around problem compiling gzip with mingw for the win32 variant
authorBdale Garbee <bdale@gag.com>
Sun, 29 Jul 2018 06:50:53 +0000 (14:50 +0800)
committerBdale Garbee <bdale@gag.com>
Sun, 29 Jul 2018 06:50:53 +0000 (14:50 +0800)
debian/changelog
debian/patches/fix-mingw-compile.diff [new file with mode: 0644]
debian/patches/series

index 315dbccb03b6cf9585b214be7c34e2e1fe746a83..fe6dbbccc48d80f01802345ffcc736699755b727 100644 (file)
@@ -5,8 +5,9 @@ gzip (1.9-1) UNRELEASED; urgency=medium
     'binary' due to missing dashes in an option detection pattern match,
     closes: #854878
   * update to policy 4.1.5, including use of https in vcs entries
+  * patch gzip.c to work around mingw compiliation failure
 
- -- Bdale Garbee <bdale@gag.com>  Sat, 28 Jul 2018 16:08:58 +0800
+ -- Bdale Garbee <bdale@gag.com>  Sun, 29 Jul 2018 14:44:12 +0800
 
 gzip (1.8-1) unstable; urgency=low
 
diff --git a/debian/patches/fix-mingw-compile.diff b/debian/patches/fix-mingw-compile.diff
new file mode 100644 (file)
index 0000000..96d63b0
--- /dev/null
@@ -0,0 +1,31 @@
+--- gzip-1.9/gzip.c    2018-01-07 13:05:21.000000000 +0800
++++ /tmp/gzip.c        2018-07-29 14:37:00.228844928 +0800
+@@ -1910,6 +1910,11 @@
+     return OK;
+ }
++#ifdef __MINGW32__
++typedef int uid_t;
++typedef int gid_t;
++#endif
++
+ /* Change the owner and group of a file.  FD is a file descriptor for
+    the file and NAME its name.  Change it to user UID and to group GID.
+    If UID or GID is -1, though, do not change the corresponding user
+@@ -1917,13 +1922,15 @@
+ static void
+ do_chown (int fd, char const *name, uid_t uid, gid_t gid)
+ {
+-#ifndef NO_CHOWN
++#ifndef __MINGW32__
++#ifndef NO_CHOWN 
+ # if HAVE_FCHOWN
+   ignore_value (fchown (fd, uid, gid));
+ # else
+   ignore_value (chown (name, uid, gid));
+ # endif
+ #endif
++#endif
+ }
+ /* ========================================================================
index 34fccc826047792b050efd187ceadf79cb1c8f20..a0ba90ee750444437e8939ff670fd4b6d08dcb3c 100644 (file)
@@ -1,3 +1,4 @@
 sigpipe.diff
 gzip_reproducible_build.diff
 zgrep-syntax-error.diff
+fix-mingw-compile.diff