summaryrefslogtreecommitdiff
path: root/ext/pty/pty.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pty/pty.c')
-rw-r--r--ext/pty/pty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 7726f154eb..341dbbf88b 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -237,7 +237,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int nomesg,
dfl.sa_flags = 0;
sigemptyset(&dfl.sa_mask);
-#if defined(__sun) || (defined(__FreeBSD__) && __FreeBSD_version < 902000)
+#if defined(__sun) || defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD_version < 902000)
/* workaround for Solaris 10: grantpt() doesn't work if FD_CLOEXEC is set. [ruby-dev:44688] */
/* FreeBSD 9.2 or later supports O_CLOEXEC
* http://www.freebsd.org/cgi/query-pr.cgi?pr=162374 */