@@ -845,6 +845,7 @@ console_set_winsize(VALUE io, VALUE size)
845
845
VALUE row , col , xpixel , ypixel ;
846
846
const VALUE * sz ;
847
847
long sizelen ;
848
+ int fd ;
848
849
849
850
size = rb_Array (size );
850
851
if ((sizelen = RARRAY_LEN (size )) != 2 && sizelen != 4 ) {
@@ -853,7 +854,7 @@ console_set_winsize(VALUE io, VALUE size)
853
854
sz = RARRAY_CONST_PTR (size );
854
855
row = sz [0 ], col = sz [1 ], xpixel = ypixel = Qnil ;
855
856
if (sizelen == 4 ) xpixel = sz [2 ], ypixel = sz [3 ];
856
- int fd = GetWriteFD (io );
857
+ fd = GetWriteFD (io );
857
858
#if defined TIOCSWINSZ
858
859
ws .ws_row = ws .ws_col = ws .ws_xpixel = ws .ws_ypixel = 0 ;
859
860
#define SET (m ) ws.ws_##m = NIL_P(m) ? 0 : (unsigned short)NUM2UINT(m)
@@ -1399,7 +1400,7 @@ console_clear_screen(VALUE io)
1399
1400
1400
1401
#ifndef HAVE_RB_IO_OPEN_DESCRIPTOR
1401
1402
static VALUE
1402
- rb_io_open_descriptor (VALUE klass , int descriptor , int mode , VALUE path , VALUE timeout , rb_io_enc_t * encoding )
1403
+ io_open_descriptor_fallback (VALUE klass , int descriptor , int mode , VALUE path , VALUE timeout , void * encoding )
1403
1404
{
1404
1405
rb_update_max_fd (descriptor );
1405
1406
@@ -1417,6 +1418,7 @@ rb_io_open_descriptor(VALUE klass, int descriptor, int mode, VALUE path, VALUE t
1417
1418
1418
1419
return self ;
1419
1420
}
1421
+ #define rb_io_open_descriptor io_open_descriptor_fallback
1420
1422
#endif
1421
1423
1422
1424
#ifndef HAVE_RB_IO_CLOSED_P
0 commit comments