]> granicus.if.org Git - strace/commitdiff
defs.h: stop including <asm/unistd.h>
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 31 Dec 2016 22:12:08 +0000 (22:12 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 31 Dec 2016 22:12:08 +0000 (22:12 +0000)
Limit the number of files where <asm/unistd.h> is included
to only those few that need it.

* defs.h: Do not include <asm/unistd.h>.
* clone.c: Include <asm/unistd.h>.
* strace.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.

clone.c
defs.h
strace.c
syscall.c
util.c

diff --git a/clone.c b/clone.c
index b5221f9da6b3f8dd3130e73e7a123de3ad280632..5c60fbe47c6f0046d95778f36ffa7c9af45e0e2a 100644 (file)
--- a/clone.c
+++ b/clone.c
@@ -30,8 +30,8 @@
  */
 
 #include "defs.h"
-
 #include <sched.h>
+#include <asm/unistd.h>
 
 #ifndef CSIGNAL
 # define CSIGNAL 0x000000ff
diff --git a/defs.h b/defs.h
index 83d28f04c55c3e94eb4d38a83a0c6936373c2eda..934d21c20516a216a353930e4d6a8c9285f8986c 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -51,7 +51,6 @@
 #include <errno.h>
 #include <time.h>
 #include <sys/time.h>
-#include <asm/unistd.h>
 
 #include "kernel_types.h"
 #include "mpers_type.h"
index 9df942ecd452700216f359d7c5bf57cc07798bd5..e95e64ceb4938f209ee678aa60e7197b4ecdbb11 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -43,6 +43,7 @@
 #ifdef HAVE_PRCTL
 # include <sys/prctl.h>
 #endif
+#include <asm/unistd.h>
 
 #include "ptrace.h"
 #include "printsiginfo.h"
index c821d7efdb01ebb7909c2c73a9111451c3c716e8..9de30566dc06106920754091dd6259bb16d15806 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -39,6 +39,9 @@
 /* for struct iovec */
 #include <sys/uio.h>
 
+/* for __X32_SYSCALL_BIT */
+#include <asm/unistd.h>
+
 #include "regs.h"
 #include "ptrace.h"
 
diff --git a/util.c b/util.c
index 67a847f781f00c0719bb71633c3b1ffcda518c3e..08880bf9727d1049a271e7d54d9a5f3c304ebdb8 100644 (file)
--- a/util.c
+++ b/util.c
@@ -39,6 +39,7 @@
 # include <sys/xattr.h>
 #endif
 #include <sys/uio.h>
+#include <asm/unistd.h>
 
 #include "regs.h"
 #include "ptrace.h"