diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-19 11:37:16 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-19 11:37:16 +0000 |
commit | b67d1000ae6c54d953fe2ed414fa7c274d7b463a (patch) | |
tree | ac6f7640ce4cdc97fc40c214d0b30c53fb32df7a /ext/pty | |
parent | fcca1f25ccc9fa4dead044869e5e3b7cb50be794 (diff) |
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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/pty')
-rw-r--r-- | ext/pty/extconf.rb | 1 | ||||
-rw-r--r-- | ext/pty/pty.c | 4 |
2 files changed, 5 insertions, 0 deletions
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 */ |