$NetBSD: patch-aa,v 1.1 2008/06/19 14:39:58 taca Exp $ --- termios.c.orig 2007-05-30 04:09:04.000000000 +0000 +++ termios.c @@ -12,11 +12,11 @@ #include #include -#ifdef HAVE_TYPE_RB_IO_T +#if !defined(OpenFile) && defined(HAVE_TYPE_RB_IO_T) typedef rb_io_t OpenFile; #endif -#if defined(HAVE_TYPE_RB_IO_T) || defined(HAVE_ST_FD) +#if (!defined(OpenFile) && defined(HAVE_TYPE_RB_IO_T)) || defined(HAVE_ST_FD) # define FILENO(fptr) (fptr->fd) #else # define FILENO(fptr) fileno(fptr->f) @@ -229,7 +229,7 @@ termios_tcsetattr(io, opt, param) Check_Type(io, T_FILE); Check_Type(opt, T_FIXNUM); if (CLASS_OF(param) != cTermios) { - char *type = rb_class2name(CLASS_OF(param)); + const char *type = rb_class2name(CLASS_OF(param)); rb_raise(rb_eTypeError, "wrong argument type %s (expected Termios::Termios)", type);