mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
libc: silence sysconf(_SC_GETPW_R_SIZE_MAX) warning
Currently, running ripgrep on Genode emits "Warning: sysconf(71) not implemented". Return -1 without setting errno, which is a valid return value according to getpwnam(3) and silence the warning. Fixes #5043
This commit is contained in:
parent
6eaf333f10
commit
a482bb8a89
@ -23,6 +23,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
|
||||
/* libc-internal includes */
|
||||
#include <internal/plugin.h>
|
||||
@ -58,6 +59,8 @@ extern "C" long sysconf(int name)
|
||||
Affinity::Space space = _global_env->cpu().affinity_space();
|
||||
return space.total() ? : 1;
|
||||
}
|
||||
case _SC_GETPW_R_SIZE_MAX:
|
||||
return -1;
|
||||
default:
|
||||
warning(__func__, "(", name, ") not implemented");
|
||||
return Errno(EINVAL);
|
||||
|
Loading…
Reference in New Issue
Block a user