try Paul Eggert's upstream fix for the mingw compilation problem in 1.9
[debian/gzip] / debian / patches / fix-mingw-compile.diff
1 --- gzip-1.9/gzip.c     2018-01-07 13:05:21.000000000 +0800
2 +++ /tmp/gzip.c 2018-07-29 14:37:00.228844928 +0800
3 @@ -1910,6 +1910,11 @@
4      return OK;
5  }
6  
7 +#ifdef __MINGW32__
8 +typedef int uid_t;
9 +typedef int gid_t;
10 +#endif
11 +
12  /* Change the owner and group of a file.  FD is a file descriptor for
13     the file and NAME its name.  Change it to user UID and to group GID.
14     If UID or GID is -1, though, do not change the corresponding user
15 @@ -1917,13 +1922,15 @@
16  static void
17  do_chown (int fd, char const *name, uid_t uid, gid_t gid)
18  {
19 -#ifndef NO_CHOWN
20 +#ifndef __MINGW32__
21 +#ifndef NO_CHOWN 
22  # if HAVE_FCHOWN
23    ignore_value (fchown (fd, uid, gid));
24  # else
25    ignore_value (chown (name, uid, gid));
26  # endif
27  #endif
28 +#endif
29  }
30  
31  /* ========================================================================