Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 elilo (3.16-1~ports) UNRELEASED; urgency=medium
 .
   * New upstream release.
Author: John Paul Adrian Glaubitz <glaubitz@localhost>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2019-04-06

--- elilo-3.16.orig/ia64/gzip.c
+++ elilo-3.16/ia64/gzip.c
@@ -136,7 +136,7 @@ static long bytes_out;
 
 static void error(char *m);
 
-static jmp_buf jbuf;
+static jmp_buf_ia64_elilo jbuf;
 static int error_return;
 static UINTN elf_is_big_endian;	/* true if ELF file is big endian */
 
@@ -596,7 +596,7 @@ tail:
 load_abort:
 	free_kmem();
 	error_return = ELILO_LOAD_ABORTED;
-	longjmp(jbuf, 1);
+	longjmp_ia64_elilo(jbuf, 1);
 }
 
 static void
@@ -604,7 +604,7 @@ error(char *x)
 {
 	ERR_PRT((L"%s : %a", LD_NAME, x));
 	/* will eventually exit with error from gunzip() */
-	longjmp(jbuf,1);
+	longjmp_ia64_elilo(jbuf,1);
 }
 
 INT32
@@ -643,7 +643,7 @@ gunzip_kernel(fops_fd_t fd, kdesc_t *kd)
 	insize     = 0;
 	bytes_out  = 0;
 
-	if (setjmp(jbuf) == 1) goto error;
+	if (setjmp_ia64_elilo(jbuf) == 1) goto error;
 
 
 	ret = decompress_kernel();
--- elilo-3.16.orig/ia64/longjmp.S
+++ elilo-3.16/ia64/longjmp.S
@@ -16,9 +16,9 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.
 
-   Note that __sigsetjmp() did NOT flush the register stack.  Instead,
-   we do it here since __longjmp() is usually much less frequently
-   invoked than __sigsetjmp(). The only difficulty is that __sigsetjmp()
+   Note that __sigsetjmp_ia64_elilo() did NOT flush the register stack.  Instead,
+   we do it here since __longjmp_ia64_elilo() is usually much less frequently
+   invoked than __sigsetjmp(). The only difficulty is that __sigsetjmp_ia64_elilo()
    didn't (and wouldn't be able to) save ar.rnat either.  This is a problem
    because if we're not careful, we could end up loading random NaT bits.
    There are two cases:
@@ -38,12 +38,12 @@
 #	define	pNeg	p7	/* is rotate count negative? */
 
 
-	/* __longjmp(__jmp_buf buf, int val) */
+	/* __longjmp_ia64_elilo(__jmp_buf_ia64_elilo buf, int val) */
 
 	.text 
-	.global longjmp
-	.proc longjmp
-longjmp:
+	.global longjmp_ia64_elilo
+	.proc longjmp_ia64_elilo
+longjmp_ia64_elilo:
 	alloc r8=ar.pfs,2,1,0,0
 	mov r27=ar.rsc
 	add r2=0x98,in0		// r2 <- &jmpbuf.orig_jmp_buf_addr
@@ -159,4 +159,4 @@ longjmp:
 	invala			// virt. -> phys. regnum mapping may change
 	mov pr=r24,-1
 	br.ret.dptk.few rp
-	.endp longjmp
+	.endp longjmp_ia64_elilo
--- elilo-3.16.orig/ia64/setjmp.S
+++ elilo-3.16/ia64/setjmp.S
@@ -68,18 +68,18 @@
 	/* The following two entry points are the traditional entry points: */
 
 	.text
-	.global setjmp
-	.proc setjmp
-setjmp:
+	.global setjmp_ia64_elilo
+	.proc setjmp_ia64_elilo
+setjmp_ia64_elilo:
 	alloc r8=ar.pfs,2,0,0,0
 	mov in1=1
-	br.cond.sptk.many __sigsetjmp
-	.endp setjmp
+	br.cond.sptk.many __sigsetjmp_ia64_elilo
+	.endp setjmp_ia64_elilo
 
-	/* __sigsetjmp(__jmp_buf buf, int savemask) */
+	/* __sigsetjmp_ia64_elilo(__jmp_buf buf, int savemask) */
 
-	.proc __sigsetjmp
-__sigsetjmp:
+	.proc __sigsetjmp_ia64_elilo
+__sigsetjmp_ia64_elilo:
 	//.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
 	.body
 	alloc loc1=ar.pfs,2,2,2,0
@@ -171,4 +171,4 @@ __sigsetjmp:
 	mov ar.pfs=loc1
 	br.ret.sptk.many rp
 
-	.endp __sigsetjmp
+	.endp __sigsetjmp_ia64_elilo
--- elilo-3.16.orig/ia64/setjmp.h
+++ elilo-3.16/ia64/setjmp.h
@@ -22,7 +22,7 @@
 #define _JBLEN	70
 
 /* the __jmp_buf element type should be __float80 per ABI... */
-typedef long jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
+typedef long jmp_buf_ia64_elilo[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
 
-extern int setjmp (jmp_buf __env);
-extern void longjmp (jmp_buf __env, int __val);
+extern int setjmp_ia64_elilo (jmp_buf_ia64_elilo __env);
+extern void longjmp_ia64_elilo (jmp_buf_ia64_elilo __env, int __val);
