From f1bdf822da2005490df9b8a30c9f9096ff468db9 Mon Sep 17 00:00:00 2001 From: yugui Date: Fri, 19 Dec 2008 11:37:16 +0000 Subject: merges r20846 from trunk into ruby_1_9_1 and filsters modification for 1.9.2 features. * ext/pty/extconf.rb: check util.h for OpenBSD. * ext/pty/pty.c: include util.h if available. fix variable name. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/pty/extconf.rb | 1 + ext/pty/pty.c | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'ext') diff --git a/ext/pty/extconf.rb b/ext/pty/extconf.rb index 87fbdc602..c2fed085c 100644 --- a/ext/pty/extconf.rb +++ b/ext/pty/extconf.rb @@ -4,6 +4,7 @@ if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM have_header("sys/stropts.h") have_func("setresuid") have_header("libutil.h") + have_header("util.h") # OpenBSD openpty have_header("pty.h") have_library("util", "openpty") if have_func("openpty") or diff --git a/ext/pty/pty.c b/ext/pty/pty.c index ce805544f..fc06d2dd5 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -15,6 +15,9 @@ #ifdef HAVE_LIBUTIL_H #include #endif +#ifdef HAVE_UTIL_H +#include +#endif #ifdef HAVE_PTY_H #include #endif @@ -417,6 +420,7 @@ getDevice(int *master, int *slave, char SlaveName[DEVICELEN]) rb_gc(); get_device_once(master, slave, SlaveName, 1); } + return Qnil; } /* ruby function: getpty */ -- cgit