diff options
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | ext/pty/extconf.rb | 1 | ||||
| -rw-r--r-- | ext/pty/pty.c | 4 |
3 files changed, 11 insertions, 0 deletions
@@ -1,3 +1,9 @@ +Wed Dec 17 19:37:30 2008 Tanaka Akira <akr@fsij.org> + + * ext/pty/extconf.rb: check util.h for OpenBSD. + + * ext/pty/pty.c: include util.h if available. + Wed Dec 17 19:23:28 2008 Keiju Ishitsuka <keiju@ruby-lang.org> * lib/matrix.rb: shut up warning. [ruby-dev:37481] [Bug #899] diff --git a/ext/pty/extconf.rb b/ext/pty/extconf.rb index 87fbdc6024..c2fed085c8 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 ce805544fb..fc06d2dd5e 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -15,6 +15,9 @@ #ifdef HAVE_LIBUTIL_H #include <libutil.h> #endif +#ifdef HAVE_UTIL_H +#include <util.h> +#endif #ifdef HAVE_PTY_H #include <pty.h> #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 */ |
