summaryrefslogtreecommitdiff
path: root/src/nonstd/SYSCALL_NUMBER.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nonstd/SYSCALL_NUMBER.c')
-rw-r--r--src/nonstd/SYSCALL_NUMBER.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nonstd/SYSCALL_NUMBER.c b/src/nonstd/SYSCALL_NUMBER.c
index f37e4a21..10f2aeeb 100644
--- a/src/nonstd/SYSCALL_NUMBER.c
+++ b/src/nonstd/SYSCALL_NUMBER.c
@@ -1,8 +1,7 @@
#include <nonstd/syscall.h>
-#define SYSCALL_NUMBER(_var, _name, _notfound) long _var = _notfound
-
- static int _var = -2; do { \
- if (_var == -2) { (_var) = __libc(SYSCALL_LOOKUP)(_name); } \
+#define SYSCALL_NUMBER(_var, _name, _notfound) \
+ static long _var = -2; do { \
+ if (_var == -2) { (_var) = ((long (*)(char*))__libc(SYSCALL_LOOKUP))(_name); } \
if (_var == -1) { errno = ENOSYS; return (_notfound); } \
} while (0)