summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-10-02 14:35:15 +0200
committerLinus Groh <mail@linusgroh.de>2021-10-17 17:09:58 +0100
commit685045176b565740275e24b522bf03ad145ca854 (patch)
tree7f24f542c8f4acb5b9d18be5fb7b85f947b528a2 /Userland/Libraries/LibC
parentb5fcb10493104538571cfd99517dc2e73b6257ae (diff)
downloadserenity-685045176b565740275e24b522bf03ad145ca854.zip
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.
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r--Userland/Libraries/LibC/errno_numbers.h1
1 files changed, 1 insertions, 0 deletions
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