From c87557e9c1865fa1a6440de34ff6ce6fc858a2b7 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 7 Jan 2023 14:23:02 -0700 Subject: [PATCH] Kernel+Libraries: Don't include limits.h from LibELF/Validation.h The fallout of this is that Kernel/Syscalls/execve.cpp doesn't have access to ARG_MAX anymore, so move that definition to Kernel/API as well --- Kernel/API/POSIX/sys/limits.h | 2 ++ Userland/Libraries/LibC/limits.h | 2 -- Userland/Libraries/LibELF/Validation.h | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Kernel/API/POSIX/sys/limits.h b/Kernel/API/POSIX/sys/limits.h index 93609efb133..6de2f99b5a9 100644 --- a/Kernel/API/POSIX/sys/limits.h +++ b/Kernel/API/POSIX/sys/limits.h @@ -25,4 +25,6 @@ #define NGROUPS_MAX 32 +#define ARG_MAX 65536 + #define PTHREAD_STACK_MIN (64 * 1024) // 64KiB diff --git a/Userland/Libraries/LibC/limits.h b/Userland/Libraries/LibC/limits.h index 4be62111f99..aa7e3138ab0 100644 --- a/Userland/Libraries/LibC/limits.h +++ b/Userland/Libraries/LibC/limits.h @@ -62,8 +62,6 @@ #define LLONG_WIDTH 64 #define ULLONG_WIDTH 64 -#define ARG_MAX 65536 - #define SSIZE_MAX LONG_MAX #define LINK_MAX 4096 diff --git a/Userland/Libraries/LibELF/Validation.h b/Userland/Libraries/LibELF/Validation.h index cee09a8c413..8f201e8cbc5 100644 --- a/Userland/Libraries/LibELF/Validation.h +++ b/Userland/Libraries/LibELF/Validation.h @@ -8,7 +8,6 @@ #include #include -#include namespace ELF {