From 0da6e39191e1cb9b5d8e78d212ca0ae7dee5f145 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sun, 29 Jul 2018 14:50:53 +0800 Subject: [PATCH] patch around problem compiling gzip with mingw for the win32 variant --- debian/changelog | 3 ++- debian/patches/fix-mingw-compile.diff | 31 +++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 debian/patches/fix-mingw-compile.diff diff --git a/debian/changelog b/debian/changelog index 315dbcc..fe6dbbc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sat, 28 Jul 2018 16:08:58 +0800 + -- Bdale Garbee 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 index 0000000..96d63b0 --- /dev/null +++ b/debian/patches/fix-mingw-compile.diff @@ -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 + } + + /* ======================================================================== diff --git a/debian/patches/series b/debian/patches/series index 34fccc8..a0ba90e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ sigpipe.diff gzip_reproducible_build.diff zgrep-syntax-error.diff +fix-mingw-compile.diff -- 2.30.2