From: Dmitry V. Levin Date: Sun, 28 May 2017 17:13:29 +0000 (+0000) Subject: signal: limit scope of struct old_sigaction32 definition X-Git-Tag: v4.18~149 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9cdd9f54c1a2d2966be093fbe9b4662f81b2380;p=strace signal: limit scope of struct old_sigaction32 definition * signal.c (struct old_sigaction32): Define only if [!current_wordsize]. --- diff --git a/signal.c b/signal.c index 5f6650f2..40e8accf 100644 --- a/signal.c +++ b/signal.c @@ -320,14 +320,6 @@ struct old_sigaction { #endif ; -struct old_sigaction32 { - /* sa_handler may be a libc #define, need to use other name: */ - uint32_t sa_handler__; - uint32_t sa_mask; - uint32_t sa_flags; - uint32_t sa_restorer; -}; - static void decode_old_sigaction(struct tcb *const tcp, const kernel_ulong_t addr) { @@ -335,7 +327,12 @@ decode_old_sigaction(struct tcb *const tcp, const kernel_ulong_t addr) #ifndef current_wordsize if (current_wordsize < sizeof(sa.sa_handler__)) { - struct old_sigaction32 sa32; + struct old_sigaction32 { + uint32_t sa_handler__; + uint32_t sa_mask; + uint32_t sa_flags; + uint32_t sa_restorer; + } sa32; if (umove_or_printaddr(tcp, addr, &sa32)) return;