Fix to make it compile under Win32.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 29 Sep 2003 17:10:01 +0000 (17:10 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 29 Sep 2003 17:10:01 +0000 (17:10 +0000)
crypto/bio/bss_file.c

index 1f9bd3312af7e4c731a1bdb400c6dba43a589edb..6904b5c081c4af65857985968039f0db0c69de4f 100644 (file)
@@ -215,9 +215,9 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
                b->init=1;
 #if defined(OPENSSL_SYS_WINDOWS)
                if (num & BIO_FP_TEXT)
-                       _setmode(fd,_O_TEXT);
+                       _setmode(fileno((FILE *)ptr),_O_TEXT);
                else
-                       _setmode(fd,_O_BINARY);
+                       _setmode(fileno((FILE *)ptr),_O_BINARY);
 #elif defined(OPENSSL_SYS_MSDOS)
                {
                int fd = fileno((FILE*)ptr);