summaryrefslogtreecommitdiff
path: root/ext/io
diff options
context:
space:
mode:
Diffstat (limited to 'ext/io')
-rw-r--r--ext/io/console/console.c4
-rw-r--r--ext/io/console/extconf.rb1
2 files changed, 5 insertions, 0 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index ea5ff129e7..ec7ecdafe7 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -103,6 +103,10 @@ rb_f_send(int argc, VALUE *argv, VALUE recv)
}
#endif
+#ifndef HAVE_RB_SYM2STR
+# define rb_sym2str(sym) rb_id2str(SYM2ID(sym))
+#endif
+
typedef struct {
int vmin;
int vtime;
diff --git a/ext/io/console/extconf.rb b/ext/io/console/extconf.rb
index 454a3a70db..be536dff9f 100644
--- a/ext/io/console/extconf.rb
+++ b/ext/io/console/extconf.rb
@@ -18,6 +18,7 @@ end
if ok
have_header("sys/ioctl.h") if hdr
have_func("rb_funcallv")
+ have_func("rb_sym2str")
# rb_check_hash_type: 1.9.3
# rb_io_get_write_io: 1.9.1
# rb_cloexec_open: 2.0.0