Use an if instead of a case statemente. If __NR_finit_module is not
defined in system headers we define it to -1, causing a "duplicate case
value" error. Yet, we don't want to actually call our finit_module()
function if -1 is passed.
This also fix errno being set with negative value.
va_list ap;
long ret;
- switch (__sysno) {
- case -1:
- errno = -ENOSYS;
+ if (__sysno == -1) {
+ errno = ENOSYS;
return -1;
- case __NR_finit_module: {
+ }
+
+ if (__sysno == __NR_finit_module) {
const char *args;
int flags;
int fd;
va_end(ap);
return ret;
}
- }
/*
* FIXME: no way to call the libc function - let's hope there are no