Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1 | From 879ae71c472ce522f1b3514d2abf6ad49b4acc07 Mon Sep 17 00:00:00 2001 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Mon, 18 Sep 2017 22:51:32 -0700 |
| 4 | Subject: [PATCH] tests/sigaction: Check for mips and alpha before using |
| 5 | sa_restorer |
| 6 | |
| 7 | local structure does not define restorer member for mips and alpha |
| 8 | in definition, we need to match that assumption here where they are |
| 9 | being set |
| 10 | |
| 11 | Fixes |
| 12 | | ../../strace-4.18/tests/sigaction.c:177:36: error: 'struct_set_sa {aka struct set_sa}' has no member named 'restorer' |
| 13 | | # define SA_RESTORER_ARGS , new_act->restorer |
| 14 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 15 | Upstream-Status: Pending |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 17 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 18 | --- |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 19 | tests/sigaction.c | 2 +- |
| 20 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 21 | |
| 22 | diff --git a/tests/sigaction.c b/tests/sigaction.c |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 23 | index 95be197..54819f9 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 24 | --- a/tests/sigaction.c |
| 25 | +++ b/tests/sigaction.c |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 26 | @@ -156,7 +156,7 @@ main(void) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 27 | sigdelset(mask.libc, SIGHUP); |
| 28 | |
| 29 | memcpy(new_act->mask, mask.old, sizeof(mask.old)); |
| 30 | -#ifdef SA_RESTORER |
| 31 | +#if defined(SA_RESTORER) && !defined(MIPS) && !defined(ALPHA) |
| 32 | new_act->flags = SA_RESTORER; |
| 33 | new_act->restorer = (unsigned long) 0xdeadfacecafef00dULL; |
| 34 | # define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx" |