diff options
author | thatdutchguy <209150+thatdutchguy@users.noreply.github.com> | 2021-03-16 11:05:23 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-16 21:56:47 +0100 |
commit | 10e3e8f6d43bbb9c03328dae2a9875f955fd0a86 (patch) | |
tree | 75970ac6820a187426301674410a59abb948b179 | |
parent | fa6bce5087618f8b8bb321e0ade082019d5dd7a7 (diff) | |
download | serenity-10e3e8f6d43bbb9c03328dae2a9875f955fd0a86.zip |
Kernel: Add _SC_CLK_TCK to sysconf.
Unbreaks the hatari port.
-rw-r--r-- | Kernel/Syscalls/sysconf.cpp | 3 | ||||
-rw-r--r-- | Kernel/UnixTypes.h | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibC/unistd.h | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/Syscalls/sysconf.cpp b/Kernel/Syscalls/sysconf.cpp index 4a3b13b7a5..c6ae283190 100644 --- a/Kernel/Syscalls/sysconf.cpp +++ b/Kernel/Syscalls/sysconf.cpp @@ -44,6 +44,9 @@ KResultOr<long> Process::sys$sysconf(int name) return TTY_NAME_MAX; case _SC_GETPW_R_SIZE_MAX: return 4096; // idk + case _SC_CLK_TCK: + // FIXME: should return Number of clock intervals per second for times() + return 100; // seems to be 100 on x86_64 default: return EINVAL; } diff --git a/Kernel/UnixTypes.h b/Kernel/UnixTypes.h index e200775dba..6932baae62 100644 --- a/Kernel/UnixTypes.h +++ b/Kernel/UnixTypes.h @@ -63,6 +63,7 @@ enum { _SC_TTY_NAME_MAX, _SC_PAGESIZE, _SC_GETPW_R_SIZE_MAX, + _SC_CLK_TCK, }; #define PERF_EVENT_SAMPLE 0 diff --git a/Userland/Libraries/LibC/unistd.h b/Userland/Libraries/LibC/unistd.h index 6c978e2dc1..a4ead75035 100644 --- a/Userland/Libraries/LibC/unistd.h +++ b/Userland/Libraries/LibC/unistd.h @@ -177,6 +177,7 @@ enum { _SC_TTY_NAME_MAX, _SC_PAGESIZE, _SC_GETPW_R_SIZE_MAX, + _SC_CLK_TCK, }; #define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF |