From cbeb1009a9faa966821190a4a83d4a120aefd753 Mon Sep 17 00:00:00 2001 From: Ben Wijen Date: Fri, 15 Jan 2021 14:45:27 +0100 Subject: [PATCH] syscalls.cc: Use EISDIR This is the non-POSIX value returned by Linux since 2.1.132. --- winsup/cygwin/syscalls.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 3030f6fff..4742c6653 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1106,7 +1106,7 @@ unlink (const char *ourname) else if (win32_name.isdir ()) { debug_printf ("unlinking a directory"); - set_errno (EPERM); + set_errno (EISDIR); goto done; }