]> granicus.if.org Git - strace/commit
m68k: fix build
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 21 Feb 2018 23:03:27 +0000 (23:03 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 21 Feb 2018 23:03:27 +0000 (23:03 +0000)
commit6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92
tree287db2fae8b7dee5948f48936d804b4ac190ced1
parent51d40516df28d03e693fd782a4167d7bcf4c6ad3
m68k: fix build

When <sys/reg.h> is included after <linux/ptrace.h>, the build fails
on m68k with the following diagnostics:

  In file included from /usr/include/linux/ptrace.h:101:0,
                   from ptrace.h:51,
                   from sigreturn.c:2:
  /usr/include/m68k-linux-gnu/sys/reg.h:26:3: error: expected identifier
  before numeric constant
     PT_D1 = 0,
     ^

Apparently, the only architecture where strace needs definitions
provided by <sys/reg.h> is x86_64, other three (m68k, tile, and x86)
are fine with definitions already provided by <linux/ptrace.h>.

Fix the issue by getting rid of <sys/reg.h> and defining necessary
macros in linux/x86_64/arch_regs.h file.

* configure.ac (AC_CHECK_HEADERS): Remove sys/reg.h.
* regs.h: Do not include <sys/reg.h>.
* linux/x86_64/arch_regs.h (R15, R14, R13, R12, RBP, RBX, R11, R10,
R9, R8, RAX, RCX, RDX, RSI, RDI, ORIG_RAX, RIP, CS, EFLAGS, RSP, SS,
FS_BASE, GS_BASE, DS, ES, FS, GS): New macros.
* NEWS: Mention this fix.

Fixes: v4.21~21 ("Include <sys/ptrace.h> early")
NEWS
configure.ac
linux/x86_64/arch_regs.h
regs.h