Commit fbc93033 authored by Waldemar Brodkorb's avatar Waldemar Brodkorb Committed by Peter Korsgaard
Browse files

libsigsegv: fix sparc64 compile

Compile tested for sparc/glibc and sparc64/glibc.
Fixes following autobuilder problem:
http://autobuild.buildroot.net/results/1d8e0c22594aef53f7a4de3491454aa78311c815/



Signed-off-by: default avatarWaldemar Brodkorb <wbx@openadk.org>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent cf5f3fcc
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
Fix sparc64 build.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>

diff -Nur libsigsegv-2.10.orig/src/fault-linux-sparc.h libsigsegv-2.10/src/fault-linux-sparc.h
--- libsigsegv-2.10.orig/src/fault-linux-sparc.h	2009-08-01 17:06:49.000000000 +0200
+++ libsigsegv-2.10/src/fault-linux-sparc.h	2015-11-29 11:55:29.000000000 +0100
@@ -27,4 +27,8 @@
    (see also <asm/sigcontext.h>)
    are quite different types.  */
 
+#if __WORDSIZE == 64
+#define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.mc_gregs[REG_O6]
+#else
 #define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[REG_O6]
+#endif