Remove building with NOCRYPTO option
[minix.git] / minix / lib / libc / sys / syscall.c
blob5df3f24d54658ed99394e1d847b4385904661008
1 #include <sys/cdefs.h>
2 #include <lib.h>
3 #include "namespace.h"
5 #ifdef __weak_alias
6 __weak_alias(syscall, _syscall)
7 #endif
9 int _syscall(endpoint_t who, int syscallnr, message *msgptr)
11 int status;
13 msgptr->m_type = syscallnr;
14 status = ipc_sendrec(who, msgptr);
15 if (status != 0) {
16 /* 'ipc_sendrec' itself failed. */
17 /* XXX - strerror doesn't know all the codes */
18 msgptr->m_type = status;
20 if (msgptr->m_type < 0) {
21 errno = -msgptr->m_type;
22 return(-1);
24 return(msgptr->m_type);