From 61caf566fc4f2ae20dd16de05d4fedaac3962c9c Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 19 Mar 2023 04:17:39 +0200 Subject: [PATCH] LibC: add errno EEXISTS --- libc/include/errno.h | 1 + libc/string/strerror.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libc/include/errno.h b/libc/include/errno.h index 815ccca3..96ed3e7e 100644 --- a/libc/include/errno.h +++ b/libc/include/errno.h @@ -10,6 +10,7 @@ #define EIO 6 #define ENOTSUP 7 #define EBADF 8 +#define EEXISTS 9 __BEGIN_DECLS diff --git a/libc/string/strerror.cpp b/libc/string/strerror.cpp index 893bb1b6..70f4d785 100644 --- a/libc/string/strerror.cpp +++ b/libc/string/strerror.cpp @@ -34,6 +34,9 @@ char* strerror(int error) case EBADF: strcpy(buffer, "Bad file descriptor"); break; + case EEXISTS: + strcpy(buffer, "File exists"); + break; default: { // FIXME: sprintf