summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/proc/proc.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/proc/proc.h')
-rw-r--r--tools/testing/selftests/proc/proc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/proc/proc.h b/tools/testing/selftests/proc/proc.h
index 4e178166fd84..31ca4b0c007f 100644
--- a/tools/testing/selftests/proc/proc.h
+++ b/tools/testing/selftests/proc/proc.h
@@ -6,6 +6,13 @@
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
+#include <sys/syscall.h>
+
+static inline pid_t sys_getpid(void)
+{
+ return syscall(SYS_getpid);
+}
static inline bool streq(const char *s1, const char *s2)
{