--- /dev/null
+From 86bbe1135d5d13db1ced64141acfb513c03d2f30 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 21 Dec 2019 10:18:38 -0800
+Subject: [PATCH] define ptrace_syscall_info to __ptrace_syscall_info
+
+glibc 2.31+ has defined __ptrace_syscall_info [1]
+
+[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d1e411e5c786ce3028d98b4e6fc02c2fcf66ae37;hp=2e4e75727eb05eef4c10470d865bd42962d5fae7
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ get_personality.h | 2 ++
+ ptrace.h          | 2 ++
+ 2 files changed, 4 insertions(+)
+
+--- a/get_personality.h
++++ b/get_personality.h
+@@ -10,7 +10,9 @@
+ 
+ # include "ptrace.h"
+ 
++# if HAVE_STRUCT___PTRACE_SYSCALL_INFO
+ extern int
+ get_personality_from_syscall_info(const struct ptrace_syscall_info *);
++# endif
+ 
+ #endif /* !STRACE_GET_PERSONALITY_H */
+--- a/ptrace.h
++++ b/ptrace.h
+@@ -186,6 +186,9 @@ struct ptrace_syscall_info {
+ };
+ # endif
+ 
++# if HAVE_STRUCT___PTRACE_SYSCALL_INFO
++#  define ptrace_syscall_info __ptrace_syscall_info
++# endif
+ # if !HAVE_DECL_PTRACE_PEEKUSER
+ #  define PTRACE_PEEKUSER PTRACE_PEEKUSR
+ # endif
+--- a/configure.ac
++++ b/configure.ac
+@@ -317,7 +317,8 @@ AC_CHECK_MEMBERS([struct stat.st_mtime_n
+ AC_CHECK_TYPES(m4_normalize([
+       struct pt_all_user_regs,
+       struct ia64_fpreg,
+-      struct ptrace_peeksiginfo_args
++      struct ptrace_peeksiginfo_args,
++      struct __ptrace_syscall_info
+ ]),,, [#include <sys/ptrace.h>])
+ 
+ # For kernels that do not have v3.10-rc1~201^2~11
 
+++ /dev/null
-From 879ae71c472ce522f1b3514d2abf6ad49b4acc07 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 18 Sep 2017 22:51:32 -0700
-Subject: [PATCH] tests/sigaction: Check for mips and alpha before using
- sa_restorer
-
-local structure does not define restorer member for mips and alpha
-in definition, we need to match that assumption here where they are
-being set
-
-Fixes
-| ../../strace-4.18/tests/sigaction.c:177:36: error: 'struct_set_sa {aka struct set_sa}' has no member named 'restorer'
-|  # define SA_RESTORER_ARGS , new_act->restorer
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- tests/sigaction.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/tests/sigaction.c
-+++ b/tests/sigaction.c
-@@ -156,7 +156,7 @@ main(void)
-       sigdelset(mask.libc, SIGHUP);
- 
-       memcpy(new_act->mask, mask.old, sizeof(mask.old));
--# ifdef SA_RESTORER
-+#if defined(SA_RESTORER) && !defined(MIPS) && !defined(ALPHA)
-       new_act->flags = SA_RESTORER;
-       new_act->restorer = (unsigned long) 0xdeadfacecafef00dULL;
- #  define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx"
 
  tests/Makefile.am | 19 +++++++++++++++++++
  1 file changed, 19 insertions(+)
 
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 825c989..4623c48 100644
 --- a/tests/Makefile.am
 +++ b/tests/Makefile.am
-@@ -14,6 +14,7 @@ SIZEOF_LONG = @SIZEOF_LONG@
+@@ -15,6 +15,7 @@ SIZEOF_LONG = @SIZEOF_LONG@
  MPERS_NAME =
  MPERS_CC_FLAGS =
  ARCH_MFLAGS =
  AM_CFLAGS = $(WARN_CFLAGS)
  AM_CPPFLAGS = $(ARCH_MFLAGS) \
              -I$(builddir) \
-@@ -477,3 +478,21 @@ BUILT_SOURCES = ksysent.h
+@@ -531,3 +532,21 @@ BUILT_SOURCES = ksysent.h
  CLEANFILES = ksysent.h
  
  include ../scno.am
 
  m4/mpers.m4 | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/m4/mpers.m4 b/m4/mpers.m4
-index 13725d7..d8578ea 100644
 --- a/m4/mpers.m4
 +++ b/m4/mpers.m4
-@@ -88,6 +88,7 @@ case "$arch" in
-       CFLAGS="$CFLAGS MPERS_CFLAGS $IFLAG"
-       AC_CACHE_CHECK([for mpers_name personality compile support], [st_cv_cc],
+@@ -103,6 +103,7 @@ case "$arch" in
+       CFLAGS="$CFLAGS MPERS_CFLAGS${IFLAG:+ }$IFLAG"
+       AC_CACHE_CHECK([for mpers_name personality compile support (using $CC $CFLAGS)], [st_cv_cc],
                [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdint.h>
 +                                                   #include <sys/syscall.h>
                                                     int main(){return 0;}]])],
                                   [st_cv_cc=yes],
                                   [st_cv_cc=no])])
-@@ -95,6 +96,7 @@ case "$arch" in
+@@ -110,6 +111,7 @@ case "$arch" in
                AC_CACHE_CHECK([for mpers_name personality runtime support],
                        [st_cv_runtime],
                        [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdint.h>
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 --- a/configure.ac
 +++ b/configure.ac
-@@ -439,11 +439,7 @@ AC_CHECK_HEADERS(m4_normalize([
+@@ -441,11 +441,7 @@ AC_CHECK_HEADERS(m4_normalize([
        sys/conf.h
        sys/eventfd.h
        sys/fanotify.h
 
            file://run-ptest \
            file://mips-SIGEMT.patch \
            file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
-           file://0001-tests-sigaction-Check-for-mips-and-alpha-before-usin.patch \
            file://ptest-spacesave.patch \
            file://uintptr_t.patch \
            file://sys_headers.patch \
+           file://0001-define-ptrace_syscall_info-to-__ptrace_syscall_info.patch \
            "
-SRC_URI[md5sum] = "84f5e72de813c9b1bb6057ee8ab428d8"
-SRC_URI[sha256sum] = "6c131198749656401fe3efd6b4b16a07ea867e8f530867ceae8930bbc937a047"
+SRC_URI[md5sum] = "b2b58f05eb3c5c0bf9d1e26003b4d698"
+SRC_URI[sha256sum] = "f7d00514d51290b6db78ad7a9de709baf93caa5981498924cbc9a744cfd2a741"
 
 inherit autotools ptest