From b3e070b2f3f7b31b02c55ae46c36a6f88927c175 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Boric Date: Sun, 25 Apr 2021 21:05:02 +0200 Subject: [PATCH] Userland: Move HOST_NAME_MAX to limits.h POSIX mandates its definition there. --- Userland/Libraries/LibC/limits.h | 2 ++ Userland/Libraries/LibC/unistd.h | 2 -- Userland/Utilities/hostname.cpp | 1 + Userland/Utilities/tree.cpp | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibC/limits.h b/Userland/Libraries/LibC/limits.h index eebf625013..cb9954e7ee 100644 --- a/Userland/Libraries/LibC/limits.h +++ b/Userland/Libraries/LibC/limits.h @@ -12,6 +12,8 @@ # define PAGE_SIZE 4096 #endif +#define HOST_NAME_MAX 64 + #define PATH_MAX 4096 #if !defined MAXPATHLEN && defined PATH_MAX # define MAXPATHLEN PATH_MAX diff --git a/Userland/Libraries/LibC/unistd.h b/Userland/Libraries/LibC/unistd.h index f81b0055e9..de2837c92e 100644 --- a/Userland/Libraries/LibC/unistd.h +++ b/Userland/Libraries/LibC/unistd.h @@ -129,8 +129,6 @@ enum { _PC_VDISABLE }; -#define HOST_NAME_MAX 64 - #define R_OK 4 #define W_OK 2 #define X_OK 1 diff --git a/Userland/Utilities/hostname.cpp b/Userland/Utilities/hostname.cpp index 83bd0eba7f..a977824e6b 100644 --- a/Userland/Utilities/hostname.cpp +++ b/Userland/Utilities/hostname.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/Userland/Utilities/tree.cpp b/Userland/Utilities/tree.cpp index ce6ebe29d3..a6a3f2c78b 100644 --- a/Userland/Utilities/tree.cpp +++ b/Userland/Utilities/tree.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include