summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:33:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 07:33:58 +0000
commit77d6698bdfbc3fb878cb4490061f50e24a2cabec (patch)
tree33b9119b2179ed4aa93cea8c29fc1615ee8db9a7 /src/lib
parentAdding upstream version 1:0.1.9998svn3589+dfsg. (diff)
downloadkbuild-upstream/1%0.1.9998svn3604+dfsg.tar.xz
kbuild-upstream/1%0.1.9998svn3604+dfsg.zip
Adding upstream version 1:0.1.9998svn3604+dfsg.upstream/1%0.1.9998svn3604+dfsgupstream
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 )
{