From b5a768200e0c95e4733038b249b325f7e306bdae Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 9 Sep 2018 20:20:57 +0300 Subject: [PATCH] src/subshell/common.c: fix #ifdef. Signed-off-by: Andrew Borodin --- src/subshell/common.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/subshell/common.c b/src/subshell/common.c index bf8fca10a..d48f9a083 100644 --- a/src/subshell/common.c +++ b/src/subshell/common.c @@ -76,14 +76,14 @@ #ifdef HAVE_OPENPTY /* includes for openpty() */ -#if HAVE_PTY_H +#ifdef HAVE_PTY_H #include #endif -#if HAVE_UTIL_H +#ifdef HAVE_UTIL_H #include #endif /* is a prerequisite of on FreeBSD 8.0. */ -#if HAVE_LIBUTIL_H +#ifdef HAVE_LIBUTIL_H #include #endif #endif /* HAVE_OPENPTY */ @@ -644,6 +644,8 @@ feed_subshell (int how, gboolean fail_on_error) /* --------------------------------------------------------------------------------------------- */ /* pty opening functions */ +#ifndef HAVE_OPENPTY + #ifdef HAVE_GRANTPT /* System V version of pty_open_master */ @@ -797,6 +799,7 @@ pty_open_slave (const char *pty_name) } #endif /* !HAVE_GRANTPT */ +#endif /* !HAVE_OPENPTY */ /* --------------------------------------------------------------------------------------------- */ /**