diff options
author | Itamar <itamar8910@gmail.com> | 2020-07-31 18:41:19 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-31 18:26:33 +0200 |
commit | 5cd7159629ee6a4053c376b5846be585d097b205 (patch) | |
tree | e69e622d5b98a3c7d82d8b459dfb5a2d1d29e98a /Kernel/Syscalls/sysconf.cpp | |
parent | cf78c16afd55381b57ccd5d868b050e8c838aa3f (diff) | |
download | serenity-5cd7159629ee6a4053c376b5846be585d097b205.zip |
Kernel: Add _SC_PAGESIZE to sysconf
This unbreaks the gcc and binutils ports.
Previously, when _SC_PAGESIZE was missing, these packages opted to
use their own versions of getpagesize which made their build fail
because of conflicting definitions of the function.
Diffstat (limited to 'Kernel/Syscalls/sysconf.cpp')
-rw-r--r-- | Kernel/Syscalls/sysconf.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/Syscalls/sysconf.cpp b/Kernel/Syscalls/sysconf.cpp index 769c3394df..5c25b41463 100644 --- a/Kernel/Syscalls/sysconf.cpp +++ b/Kernel/Syscalls/sysconf.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <Kernel/Arch/i386/CPU.h> #include <Kernel/Process.h> namespace Kernel { @@ -34,6 +35,8 @@ long Process::sys$sysconf(int name) case _SC_NPROCESSORS_CONF: case _SC_NPROCESSORS_ONLN: return Processor::processor_count(); + case _SC_PAGESIZE: + return PAGE_SIZE; default: return -EINVAL; } |