aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2025-04-16 03:59:46 -0500
committerBrent Cook <busterb@gmail.com>2025-04-16 03:59:46 -0500
commit06297aa3cee4591b50dc7cc51353a5fca1e3ae13 (patch)
tree5d0a090b59f60781977fa60fef79849b5aa5f6a2
parent78b86a2af698d771a4db5286a4222c92d074a6da (diff)
downloadportable-06297aa3cee4591b50dc7cc51353a5fca1e3ae13.tar.gz
portable-06297aa3cee4591b50dc7cc51353a5fca1e3ae13.tar.bz2
portable-06297aa3cee4591b50dc7cc51353a5fca1e3ae13.zip
reapply special case for std file descriptors
-rw-r--r--crypto/compat/posix_win.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/compat/posix_win.c b/crypto/compat/posix_win.c
index ea229c9..246f891 100644
--- a/crypto/compat/posix_win.c
+++ b/crypto/compat/posix_win.c
@@ -27,6 +27,11 @@
27static int 27static int
28is_socket(int fd) 28is_socket(int fd)
29{ 29{
30 // Border case: Don't break std* file descriptors
31 if (fd < 3)
32 return 0;
33
34 // All locally-allocated file descriptors will have the high bit set
30 return (fd & 0x80000000) == 0; 35 return (fd & 0x80000000) == 0;
31} 36}
32 37