From 22c72d8c70fd59534e846b734ed2ab7baa2a7d2b Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 5 Apr 2023 02:47:37 +0300 Subject: [PATCH] LibC: Add errno ENOTTY --- libc/include/errno.h | 1 + libc/string.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libc/include/errno.h b/libc/include/errno.h index 4b61dc1a..003084cb 100644 --- a/libc/include/errno.h +++ b/libc/include/errno.h @@ -14,6 +14,7 @@ #define ENOTEMPTY 10 #define ENAMETOOLONG 11 #define ENOBUFS 12 +#define ENOTTY 13 __BEGIN_DECLS diff --git a/libc/string.cpp b/libc/string.cpp index 08dc4844..e23ba6d0 100644 --- a/libc/string.cpp +++ b/libc/string.cpp @@ -113,6 +113,9 @@ char* strerror(int error) case ENOBUFS: strcpy(buffer, "No buffer space available"); break; + case ENOTTY: + strcpy(buffer, "Inappropriate I/O control operation"); + break; default: { // FIXME: sprintf