summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/pty/extconf.rb1
-rw-r--r--ext/pty/pty.c4
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 */