summary refs log tree commit diff
path: root/compat
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2026-06-01 14:50:25 -0400
committerJune McEnroe <june@causal.agency>2026-06-01 14:50:25 -0400
commit8a5bd6dcd6f7780354ed2e297edfddfec0273253 (patch)
treed6a47d1f9ce63cf523a845f426d0b879bc008eda /compat
parentImport LibreSSL 4.2.1 (diff)
downloadlibretls-8a5bd6dcd6f7780354ed2e297edfddfec0273253.tar.gz
libretls-8a5bd6dcd6f7780354ed2e297edfddfec0273253.zip
Import LibreSSL 4.3.0
Diffstat (limited to '')
-rw-r--r--compat/posix_win.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/compat/posix_win.c b/compat/posix_win.c
index 572e527..bc0fa36 100644
--- a/compat/posix_win.c
+++ b/compat/posix_win.c
@@ -89,6 +89,9 @@ posix_open(const char *path, ...)
 	flags &= ~O_NONBLOCK;
 
 	const int fh = open(path, flags, mode);
+	if (fh == -1) {
+		return fh;
+	}
 
 	// Set high bit to mark file descriptor as a file handle
 	return fh + 0x80000000;