update changelog for new upstream version
[debian/gzip] / debian / patches / 0001-gzip-port-better-to-mingw.patch
1 From 222dc8c90f31f7027d0aa7a18206f5c56006f780 Mon Sep 17 00:00:00 2001
2 From: Paul Eggert <eggert@cs.ucla.edu>
3 Date: Sun, 29 Jul 2018 11:27:32 -0700
4 Subject: [PATCH] gzip: port better to mingw
5
6 Problem reported by Bdale Garbee for Debian
7 * gzip.c (do_chown): Don't assume uid_t and gid_t.
8 ---
9  gzip.c | 7 +++++--
10  1 file changed, 5 insertions(+), 2 deletions(-)
11
12 diff --git a/gzip.c b/gzip.c
13 index 429e554..a023d81 100644
14 --- a/gzip.c
15 +++ b/gzip.c
16 @@ -1914,17 +1914,20 @@ local int check_ofname()
17     the file and NAME its name.  Change it to user UID and to group GID.
18     If UID or GID is -1, though, do not change the corresponding user
19     or group.  */
20 +#ifdef NO_CHOWN
21 +/* The types uid_t and gid_t do not exist on mingw, so don't assume them.  */
22 +# define do_chown(fd, name, uid, gid) ((void) 0)
23 +#else
24  static void
25  do_chown (int fd, char const *name, uid_t uid, gid_t gid)
26  {
27 -#ifndef NO_CHOWN
28  # if HAVE_FCHOWN
29    ignore_value (fchown (fd, uid, gid));
30  # else
31    ignore_value (chown (name, uid, gid));
32  # endif
33 -#endif
34  }
35 +#endif
36  
37  /* ========================================================================
38   * Copy modes, times, ownership from input file to output file.
39 -- 
40 2.18.0
41