From 685045176b565740275e24b522bf03ad145ca854 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Sat, 2 Oct 2021 14:35:15 +0200 Subject: [PATCH] LibC: Add ELAST errno macro The ELAST macro is used on many systems to refer to the largest possible valid errno value. LLVM's libc++ uses errno values of ELAST+1 and ELAST+2 internally, and defines an arbitrary fallback value for platforms which don't have the macro. This means that it's possible for their internal errno numbers could coincide with values we actually use, which would be a very bad thing. --- Userland/Libraries/LibC/errno_numbers.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibC/errno_numbers.h b/Userland/Libraries/LibC/errno_numbers.h index 62870e7bed..42d908729b 100644 --- a/Userland/Libraries/LibC/errno_numbers.h +++ b/Userland/Libraries/LibC/errno_numbers.h @@ -160,3 +160,4 @@ enum ErrnoCode { }; #define EWOULDBLOCK EAGAIN +#define ELAST EMAXERRNO