Recent changes from 0.9.7-stable
authorRichard Levitte <levitte@openssl.org>
Mon, 29 Sep 2003 19:02:26 +0000 (19:02 +0000)
committerRichard Levitte <levitte@openssl.org>
Mon, 29 Sep 2003 19:02:26 +0000 (19:02 +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);