$OpenBSD: patch-nspr_pr_include_md__openbsd_h,v 1.2 2017/05/03 07:10:37 sthen Exp $

Index: nspr/pr/include/md/_openbsd.h
--- nspr/pr/include/md/_openbsd.h.orig
+++ nspr/pr/include/md/_openbsd.h
@@ -22,8 +22,14 @@
 #define _PR_SI_ARCHITECTURE "powerpc"
 #elif defined(__sparc__)
 #define _PR_SI_ARCHITECTURE "sparc"
+#elif defined(__aarch64__)
+#define _PR_SI_ARCHITECTURE "aarch64"
 #elif defined(__arm__)
 #define _PR_SI_ARCHITECTURE "arm"
+#elif defined(__hppa__)
+#define _PR_SI_ARCHITECTURE "hppa"
+#elif defined(__mips64__) || defined(__mips64el__)
+#define _PR_SI_ARCHITECTURE "mips64"
 #endif
 
 #define PR_DLL_SUFFIX		".so"
@@ -33,7 +39,11 @@
 #define _MD_DEFAULT_STACK_SIZE	65536L
 #define _MD_MMAP_FLAGS          MAP_PRIVATE
 
+#if defined(__hppa__)
+#define HAVE_STACK_GROWING_UP
+#else
 #undef  HAVE_STACK_GROWING_UP
+#endif
 #define HAVE_DLL
 #define USE_DLFCN
 #define _PR_HAVE_SOCKADDR_LEN
@@ -67,8 +77,10 @@
 #define JB_SP_INDEX 34
 #elif defined(__amd64__)
 #define JB_SP_INDEX 6
-#elif defined(__arm__)
+#elif defined(__arm__) || defined(__aarch64__)
 #define JB_SP_INDEX 23
+#elif defined(__mips64__) || defined(__mips64el__)
+#define JB_SP_INDEX 29
 #else
 #error "Need to define SP index in jmp_buf here"
 #endif
