[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#160462: glibc: mcontext_t doesn't match what kernel returns



Package: glibc
Version: 2.2.5-14
Severity: normal

mips has a similar problem as hppa in #157374.  The attached patch fixes it
in the same way.  The patch has been sent to libc-alpha@sources.redhat.com
and linux-mips@linux-mips.org.

--- /dev/null	2002-07-07 23:38:58.000000000 -0700
+++ glibc-2.2.5/debian/patches/glibc22-mips-mcontext.dpatch	2002-09-10 20:37:41.000000000 -0700
@@ -0,0 +1,35 @@
+#! /bin/sh -e
+
+# DP: Description: MIPS makes mcontext_t a typedef to sigcontext on mips
+# DP: Author: Ryan Murray <rmurray@debian.org>
+# DP: Upstream Status: sent to libc-alpha / linux-mips lists
+# DP: Tue Sep 10 20:36:48 PDT 2002
+
+if [ $# -ne 2 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -d "$2" -f --no-backup-if-mismatch -p0 < $0;;
+    -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p0 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1
+esac
+exit 0
+
+--- sysdeps/unix/sysv/linux/mips/sys/ucontext.h	2002-09-10 20:16:52.000000000 -0700
++++ sysdeps/unix/sysv/linux/mips/sys/ucontext.h	2002-09-10 20:17:24.000000000 -0700
+@@ -61,11 +61,7 @@
+ 
+ 
+ /* Context to describe whole processor state.  */
+-typedef struct
+-  {
+-    gregset_t gregs;
+-    fpregset_t fpregs;
+-  } mcontext_t;
++typedef struct sigcontext mcontext_t;
+ 
+ /* Userlevel context.  */
+ typedef struct ucontext



Reply to: