diff options
-rw-r--r-- | crypto/compat/posix_win.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/compat/posix_win.c b/crypto/compat/posix_win.c index 3e7d227..9409af5 100644 --- a/crypto/compat/posix_win.c +++ b/crypto/compat/posix_win.c | |||
@@ -163,6 +163,9 @@ wsa_errno(int err) | |||
163 | static int | 163 | static int |
164 | is_socket(int fd) | 164 | is_socket(int fd) |
165 | { | 165 | { |
166 | /* Border case: Don't break std* file descriptors */ | ||
167 | if (fd < 3) | ||
168 | return 0; | ||
166 | return (fd & 1) == 0; /* daringly assumes that any valid socket is even */ | 169 | return (fd & 1) == 0; /* daringly assumes that any valid socket is even */ |
167 | } | 170 | } |
168 | 171 | ||