From f4db2466582ed648553891b9f0409cbd7e42e29e Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 29 Mar 2023 10:58:25 +0300 Subject: [PATCH] LibC: add ENOBUFS errno --- 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 0d1c71e4..4b61dc1a 100644 --- a/libc/include/errno.h +++ b/libc/include/errno.h @@ -13,6 +13,7 @@ #define EEXISTS 9 #define ENOTEMPTY 10 #define ENAMETOOLONG 11 +#define ENOBUFS 12 __BEGIN_DECLS diff --git a/libc/string/strerror.cpp b/libc/string/strerror.cpp index bb6cc453..0d8a9c0f 100644 --- a/libc/string/strerror.cpp +++ b/libc/string/strerror.cpp @@ -43,6 +43,9 @@ char* strerror(int error) case ENAMETOOLONG: strcpy(buffer, "Filename too long"); break; + case ENOBUFS: + strcpy(buffer, "No buffer space available"); + break; default: { // FIXME: sprintf