strace/sigreturn.c
Dmitry V. Levin 5a6dff3fe8 Include <sys/ptrace.h> early
Include "ptrace.h" before any header that can include <signal.h>
because on some architectures the latter may include <asm/sigcontext.h>
which in turn may include <asm/ptrace.h> with potentially devastating
effect on <sys/ptrace.h>.

* process.c: Include "ptrace.h" before "regs.h".
* rt_sigframe.c: Likewise.
* sigreturn.c: Include "ptrace.h" before "nsig.h".
* syscall.c: Likewise.
* wait.c: Include "ptrace.h" before <sys/wait.h>.
* strace.c: Include "ptrace.h" before <signal.h>.
* tests/ptrace.c: Likewise.
* tests/test_ucopy.c: Include <sys/ptrace.h> before <signal.h>.
2018-02-11 00:26:09 +00:00

18 lines
279 B
C

#include "defs.h"
#include "ptrace.h"
#include "nsig.h"
#include "regs.h"
#if defined HAVE_ASM_SIGCONTEXT_H && !defined HAVE_STRUCT_SIGCONTEXT
# include <asm/sigcontext.h>
#endif
#include "arch_sigreturn.c"
SYS_FUNC(sigreturn)
{
arch_sigreturn(tcp);
return RVAL_DECODED;
}