summaryrefslogtreecommitdiff
path: root/nonstd/__linux.h
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-02-10 15:26:27 -0500
committerJakob Kaivo <jkk@ung.org>2019-02-10 15:26:27 -0500
commit7defc772a8b63a39b53dfcc308cb69f8301f0516 (patch)
treee86cfb0b4472ceb120ce96d0cbfa9a519169d88e /nonstd/__linux.h
parent4ed93588a068869778238b53ceef734503b8fcd7 (diff)
add missing symbols
Diffstat (limited to 'nonstd/__linux.h')
-rw-r--r--nonstd/__linux.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/nonstd/__linux.h b/nonstd/__linux.h
deleted file mode 100644
index 4684b17f..00000000
--- a/nonstd/__linux.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdarg.h>
-#include <stddef.h>
-#include <errno.h>
-#include <string.h>
-
-#ifndef ENOSYS
-#define ENOSYS 62
-#endif
-
-extern long __syscall_x86_64(long, ...);
-#define __linux_syscall __syscall_x86_64
-#define __syscall __linux_syscall
-
-static long __syscall_lookup(const char *call)
-{
- const char *__syscalls[] = {
- [0] = "read",
- [1] = "write",
- [2] = "open",
- [3] = "close",
- [4] = "stat",
- [5] = "fstat",
- [6] = "lstat",
- [9] = "mmap",
- [60] = "exit",
- [201] = "time",
- };
-
- size_t i;
- for (i = 0; i < sizeof(__syscalls) / sizeof(__syscalls[0]); i++) {
- if (__syscalls[i] && !strcmp(__syscalls[i], call)) {
- return i;
- }
- }
- return -1;
-}