1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

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.
This commit is contained in:
Itamar 2020-07-31 18:41:19 +03:00 committed by Andreas Kling
parent cf78c16afd
commit 5cd7159629
2 changed files with 4 additions and 0 deletions

View file

@ -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;
}