mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05: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:
parent
cf78c16afd
commit
5cd7159629
Notes:
sideshowbarker
2024-07-19 04:26:29 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/5cd7159629e Pull-request: https://github.com/SerenityOS/serenity/pull/2930
2 changed files with 4 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <Kernel/Arch/i386/CPU.h>
|
||||||
#include <Kernel/Process.h>
|
#include <Kernel/Process.h>
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
@ -34,6 +35,8 @@ long Process::sys$sysconf(int name)
|
||||||
case _SC_NPROCESSORS_CONF:
|
case _SC_NPROCESSORS_CONF:
|
||||||
case _SC_NPROCESSORS_ONLN:
|
case _SC_NPROCESSORS_ONLN:
|
||||||
return Processor::processor_count();
|
return Processor::processor_count();
|
||||||
|
case _SC_PAGESIZE:
|
||||||
|
return PAGE_SIZE;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
enum {
|
enum {
|
||||||
_SC_NPROCESSORS_CONF,
|
_SC_NPROCESSORS_CONF,
|
||||||
_SC_NPROCESSORS_ONLN,
|
_SC_NPROCESSORS_ONLN,
|
||||||
|
_SC_PAGESIZE,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PERF_EVENT_MALLOC 1
|
#define PERF_EVENT_MALLOC 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue