diff --git a/libc/decl/errno_values.h b/libc/decl/errno_values.h index e6c73910..4355c7dd 100644 --- a/libc/decl/errno_values.h +++ b/libc/decl/errno_values.h @@ -47,6 +47,7 @@ #define ENXIO 55 #define EPROTONOSUPPORT 56 #define EAFNOSUPPORT 57 +#define ENOTSOCK 58 #define EOPNOTSUPP ENOTSUP diff --git a/libc/strerror.cpp b/libc/strerror.cpp index f99f4cc3..3f4982f1 100644 --- a/libc/strerror.cpp +++ b/libc/strerror.cpp @@ -76,6 +76,7 @@ extern "C" const char* sortix_strerror(int errnum) case ENXIO: return "No such device or address"; case EPROTONOSUPPORT: return "Protocol not supported"; case EAFNOSUPPORT: return "Address family not supported"; + case ENOTSOCK: return "Not a socket"; default: return "Unknown error condition"; } }