app-arch/arc: Fix building with CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Fri, 15 May 2020 07:58:19 +0000 (09:58 +0200)
committerJeroen Roovers <jer@gentoo.org>
Fri, 15 May 2020 07:59:46 +0000 (09:59 +0200)
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Closes: https://bugs.gentoo.org/show_bug.cgi?id=706714
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
app-arch/arc/arc-5.21p.ebuild
app-arch/arc/files/arc-5.21p-fno-common.patch [new file with mode: 0644]

index 93335639d0e069f74d074943e661a29fda33b359..f62a74e5478696347648934a55ef64a80ceacf80 100644 (file)
@@ -18,6 +18,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-5.21m-darwin.patch
        "${FILESDIR}"/${PN}-5.21m-gentoo-fbsd.patch
        "${FILESDIR}"/${PN}-5.21o-interix.patch
+       "${FILESDIR}"/${PN}-5.21p-fno-common.patch
 )
 
 src_prepare() {
diff --git a/app-arch/arc/files/arc-5.21p-fno-common.patch b/app-arch/arc/files/arc-5.21p-fno-common.patch
new file mode 100644 (file)
index 0000000..5de65e3
--- /dev/null
@@ -0,0 +1,34 @@
+--- a/arc.h
++++ b/arc.h
+@@ -129,4 +129,8 @@
+ extern u_short        olddate;        /* old archive date stamp */
+ extern u_short        oldtime;        /* old archive time stamp */
+ extern int      dosquash;     /* squash instead of crunch */
++extern long     stdlen;       /* bytes to read */
++extern u_char   *outbuf;
++extern u_char   *outend;
++extern short    crcval;       /* CRC check value */
+ #endif                                /* DONT_DEFINE */
+--- a/arclzw.c
++++ b/arclzw.c
+@@ -58,8 +58,7 @@
+ extern u_char *pinbuf;
+ u_char                *inbeg, *inend;
+-u_char          *outbuf;
+-u_char          *outbeg, *outend; 
++u_char          *outbeg;
+ static int      sp;           /* current stack pointer */
+ static int    inflag;
+--- a/arcunp.c
++++ b/arcunp.c
+@@ -39,8 +39,6 @@
+ #define NOHIST 0              /* no relevant history */
+ #define INREP 1                       /* sending a repeated value */
+-short    crcval;              /* CRC check value */
+-long     stdlen;              /* bytes to read */
+ #if   !DOS
+ static int    gotcr;          /* got a carriage return? */
+ #endif