summaryrefslogtreecommitdiff
path: root/comms/ruby-termios/patches/patch-aa
diff options
context:
space:
mode:
Diffstat (limited to 'comms/ruby-termios/patches/patch-aa')
-rw-r--r--comms/ruby-termios/patches/patch-aa27
1 files changed, 27 insertions, 0 deletions
diff --git a/comms/ruby-termios/patches/patch-aa b/comms/ruby-termios/patches/patch-aa
new file mode 100644
index 00000000000..28341bd102d
--- /dev/null
+++ b/comms/ruby-termios/patches/patch-aa
@@ -0,0 +1,27 @@
+$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 <unistd.h>
+ #include <string.h>
+
+-#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);