I see it as a good idea to stick to system headers whenever possible
in order to also check for possible discrepancies between strace's
internal definitions and definitions present in the system headers.
* configure.ac (AC_CHECK_HEADERS): Add linux/kcmp.h.
* tests/kcmp.h [HAVE_LINUX_KCMP_H]: Include <linux/kcmp.h>,
do not define KCMP_FILE and KCMP_SYSVSEM.
linux/if_link.h
linux/ip_vs.h
linux/ipc.h
+ linux/kcmp.h
linux/mmtimer.h
linux/msg.h
linux/neighbour.h
# include <stdio.h>
# include <unistd.h>
-# define KCMP_FILE 0
-# define KCMP_SYSVSEM 6
+
+/*
+ * We prefer to use system headers in order to catch some possible deviations in
+ * system's headers from our perception of reality, but happy to include our own
+ * definitions as well.
+ */
+# ifdef HAVE_LINUX_KCMP_H
+# include <linux/kcmp.h>
+# else
+# define KCMP_FILE 0
+# define KCMP_SYSVSEM 6
+# endif
static void
do_kcmp(kernel_ulong_t pid1, kernel_ulong_t pid2, kernel_ulong_t type,