From 9bb0a659d6d1c58140b9e5bb614a4047d946c1c6 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Sat, 25 Aug 2012 15:32:52 -0700 Subject: [PATCH] Fixes for compiling pty C-ext on linux. --- lib/19/pty/ext/extconf.rb | 1 + lib/19/pty/ext/pty.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/19/pty/ext/extconf.rb b/lib/19/pty/ext/extconf.rb index 97344b9f6e..b51efa1005 100644 --- a/lib/19/pty/ext/extconf.rb +++ b/lib/19/pty/ext/extconf.rb @@ -5,6 +5,7 @@ have_header("sys/wait.h") have_func("setresuid") have_header("libutil.h") + have_header("unistd.h") have_header("pty.h") have_library("util", "openpty") if have_func("openpty") or diff --git a/lib/19/pty/ext/pty.c b/lib/19/pty/ext/pty.c index b9fd8a88dd..f3e99c7d88 100644 --- a/lib/19/pty/ext/pty.c +++ b/lib/19/pty/ext/pty.c @@ -44,7 +44,7 @@ #include #endif -#ifdef HAVE_OPENPTY +#if defined(HAVE_OPENPTY) && !defined(HAVE_PTY_H) /* Normally, the following header would be used: * #include *