summaryrefslogtreecommitdiff
path: root/src/shared/missing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/missing.h')
-rw-r--r--src/shared/missing.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/shared/missing.h b/src/shared/missing.h
index bea1254369..91a6215226 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -636,12 +636,16 @@ static inline int setns(int fd, int nstype) {
#define CAP_AUDIT_READ 37
#endif
-static inline long raw_clone(unsigned long flags, void *child_stack) {
+static inline int raw_clone(unsigned long flags, void *child_stack) {
#if defined(__s390__) || defined(__CRIS__)
/* On s390 and cris the order of the first and second arguments
* of the raw clone() system call is reversed. */
- return syscall(__NR_clone, child_stack, flags);
+ return (int) syscall(__NR_clone, child_stack, flags);
#else
- return syscall(__NR_clone, flags, child_stack);
+ return (int) syscall(__NR_clone, flags, child_stack);
#endif
}
+
+static inline pid_t raw_getpid(void) {
+ return (pid_t) syscall(__NR_getpid);
+}