libc: fix sysctl(3) error code

All unimplemented sysctl calls would return 2 instead of -1.

Change-Id: Ib486a03dc93969e646e4e11d890dc46855d790c4
This commit is contained in:
David van Moolenbroek 2015-07-24 17:16:29 +00:00
parent c97d4ff6e5
commit 0184c63535

View file

@ -74,7 +74,8 @@ int __sysctl(const int *name, unsigned int namelen,
void *oldp, size_t *oldlenp,
const void *newp, size_t newlen)
{
return ENOENT;
errno = ENOENT;
return -1;
}
#endif /* defined(__minix) */