From 45d85986f01b2d1c77a3cc8fa47872667aa2fc1d Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Mon, 6 Feb 2023 17:13:11 -0700 Subject: [PATCH] Incorporate fix in support of https://github.com/Unidata/netcdf-c/pull/2437#issuecomment-1419381660 --- libsrc/posixio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/posixio.c b/libsrc/posixio.c index 31dbf771b1..f1a1cd75b0 100644 --- a/libsrc/posixio.c +++ b/libsrc/posixio.c @@ -1768,7 +1768,7 @@ posixio_open(const char *path, #endif if(fd < 0) { - status = errno; + status = errno ? errno : ENOENT; goto unwind_new; } *((int *)&nciop->fd) = fd; /* cast away const */