summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:34:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:34:16 +0000
commit5dcc47be540f3a6de2744025e47f33ecf4f27f12 (patch)
tree5783baf72619d0374141e9fd0a6de32db7d1ac13 /src/lib
parentAdding debian version 1:0.1.9998svn3589+dfsg-1. (diff)
downloadkbuild-5dcc47be540f3a6de2744025e47f33ecf4f27f12.tar.xz
kbuild-5dcc47be540f3a6de2744025e47f33ecf4f27f12.zip
Merging upstream version 1:0.1.9998svn3604+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/lib/nt/ntopenat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/nt/ntopenat.c b/src/lib/nt/ntopenat.c
index 6db4de7..07ae561 100644
--- a/src/lib/nt/ntopenat.c
+++ b/src/lib/nt/ntopenat.c
@@ -55,9 +55,10 @@ static int birdOpenInt(const char *pszPath, int fFlags, unsigned __int16 fMode)
* directories as the CRT doesn't allow doing that.
*/
int const iErrnoSaved = errno;
+ int iErrno;
int fd = open(pszPath, fFlags, fMode);
if ( fd < 0
- && (errno == EACCES || errno == ENOENT || errno == EISDIR)
+ && ((iErrno = errno) == EACCES || iErrno == ENOENT || iErrno == EISDIR || iErrno == EINVAL /*CIFS*/)
&& (fFlags & (_O_WRONLY | _O_RDWR | _O_RDONLY)) == _O_RDONLY
&& (fFlags & (_O_CREAT | _O_TRUNC | _O_EXCL)) == 0 )
{