From 29859cc1665b853780f8c35e00faa773cf2522dc Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
Date: Tue, 26 Apr 2016 21:03:14 +0000
Subject: Do not try to create hard links.


diff --git a/Makefile.am b/Makefile.am
index d4ecc3f..9c0b0f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -146,7 +146,7 @@ install-exec-hook remove-installed-links:
 	     rm -f "$$dest" && \
 	     case $@ in \
 	     install-exec-hook) \
-	       ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \
+	       $(LN_S) "$$source" "$$dest";; \
 	     esac \
 	    ) || exit; \
 	  done; \
-- 
2.19.0


From 7058d2d988b1c02ddc15481e98318729a1ff8791 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 2 Oct 2018 15:27:27 +0200
Subject: gcc2 patch


diff --git a/gzip.c b/gzip.c
index 7652f66..6c0647e 100644
--- a/gzip.c
+++ b/gzip.c
@@ -305,7 +305,7 @@ static const struct option longopts[] =
 
 /* local functions */
 
-local noreturn void try_help (void);
+local __attribute__ ((__noreturn__)) void try_help (void);
 local void help         (void);
 local void license      (void);
 local void version      (void);
@@ -325,7 +325,7 @@ local void copy_stat    (struct stat *ifstat);
 local void install_signal_handlers (void);
 local void remove_output_file (void);
 local RETSIGTYPE abort_gzip_signal (int);
-local noreturn void do_exit (int exitcode);
+local __attribute__ ((__noreturn__)) void do_exit (int exitcode);
 static void finish_out (void);
       int main          (int argc, char **argv);
 static int (*work) (int infile, int outfile) = zip; /* function to call */
@@ -1171,6 +1171,7 @@ local char *get_suffix(name)
         NULL, NULL};
     char const **suf;
     bool suffix_of_builtin = false;
+    char *z_lower, *match;
 
     /* Normally put Z_SUFFIX at the start of KNOWN_SUFFIXES, but if it
        is a suffix of one of them, put it at the end.  */
@@ -1184,7 +1185,7 @@ local char *get_suffix(name)
           }
       }
 
-    char *z_lower = xstrdup(z_suffix);
+    z_lower = xstrdup(z_suffix);
     strlwr(z_lower);
     known_suffixes[suffix_of_builtin
                    ? sizeof known_suffixes / sizeof *known_suffixes - 2
@@ -1199,7 +1200,7 @@ local char *get_suffix(name)
     }
     strlwr(suffix);
     slen = strlen(suffix);
-    char *match = NULL;
+    match = NULL;
     do {
        int s = strlen(*suf);
        if (slen > s && ! ISSLASH (suffix[slen - s - 1])
diff --git a/gzip.h b/gzip.h
index 2499337..1ac82f1 100644
--- a/gzip.h
+++ b/gzip.h
@@ -276,7 +276,7 @@ extern int unpack     (int in, int out);
 extern int unlzh      (int in, int out);
 
         /* in gzip.c */
-extern noreturn void abort_gzip (void);
+extern __attribute__ ((__noreturn__)) void abort_gzip (void);
 
         /* in deflate.c */
 extern void lm_init (int pack_level, ush *flags);
@@ -309,11 +309,11 @@ extern char *gzip_base_name (char *fname) _GL_ATTRIBUTE_PURE;
 extern int xunlink        (char *fname);
 extern void make_simple_name (char *name);
 extern char *add_envopt   (int *argcp, char ***argvp, char const *env);
-extern noreturn void gzip_error    (char const *m);
-extern noreturn void xalloc_die    (void);
+extern __attribute__ ((__noreturn__)) void gzip_error    (char const *m);
+extern __attribute__ ((__noreturn__)) void xalloc_die    (void);
 extern void warning       (char const *m);
-extern noreturn void read_error    (void);
-extern noreturn void write_error   (void);
+extern __attribute__ ((__noreturn__)) void read_error    (void);
+extern __attribute__ ((__noreturn__)) void write_error   (void);
 extern void display_ratio (off_t num, off_t den, FILE *file);
 extern void fprint_off    (FILE *, off_t, int);
 
diff --git a/lib/stdnoreturn.in.h b/lib/stdnoreturn.in.h
index b1d709d..d26a612 100644
--- a/lib/stdnoreturn.in.h
+++ b/lib/stdnoreturn.in.h
@@ -17,7 +17,7 @@
 
 /* Written by Paul Eggert.  */
 
-#ifndef noreturn
+#if !defined(noreturn) && !defined(__HAIKU__)
 
 /* ISO C11 <stdnoreturn.h> for platforms that lack it.
 
-- 
2.19.0

