aboutsummaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-06-02 04:20:21 +0200
committerMattias Andrée <maandree@kth.se>2020-06-02 04:20:21 +0200
commitf84d2aebd4d295f08c50b88ed4452f6c9b6605e6 (patch)
treea6a731ac9a99f67021364091426cd58a6c7b0886 /common.h
parentFix exit status regression ... now I can go back to sleep again (diff)
downloadsctrace-f84d2aebd4d295f08c50b88ed4452f6c9b6605e6.tar.gz
sctrace-f84d2aebd4d295f08c50b88ed4452f6c9b6605e6.tar.bz2
sctrace-f84d2aebd4d295f08c50b88ed4452f6c9b6605e6.tar.xz
Reject i386 and x32 applications (not yet supported)
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'common.h')
-rw-r--r--common.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/common.h b/common.h
index 458d4f9..0c9ff8f 100644
--- a/common.h
+++ b/common.h
@@ -1,9 +1,7 @@
/* See LICENSE file for copyright and license details. */
-#if !defined __x86_64__ || defined __IPL32__
-# error "This program is only implemented for x86-64"
-#endif
-
+#include <linux/elf.h>
#include <sys/ptrace.h>
+#include <linux/ptrace.h> /* After <sys/ptrace.h> */
#include <sys/syscall.h>
#include <sys/uio.h>
#include <sys/user.h>
@@ -19,6 +17,16 @@
#include <string.h>
#include <unistd.h>
+#if defined(__x86_64__) && !defined(__IPL32__)
+# include "arch-x86-64.h"
+#else
+# error "This program is only implemented for x86-64"
+#endif
+
+#if !defined(__linux__)
+# error "This program is only implemented for Linux"
+#endif
+
#include "arg.h"
#include "list-errnos.h"
#include "list-signums.h"