This _WIN32-specific patch makes it possible to "wrap" OpenSSL in another
[openssl.git] / crypto / bio / bss_file.c
index 545c1b2..480208a 100644 (file)
@@ -279,7 +279,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
 #endif
                {
 #if defined(OPENSSL_SYS_WINDOWS)
-               int fd = fileno((FILE*)ptr);
+               int fd = _fileno((FILE*)ptr);
                if (num & BIO_FP_TEXT)
                        _setmode(fd,_O_TEXT);
                else