summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/grantpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/grantpt.c')
-rw-r--r--sysdeps/unix/sysv/linux/grantpt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/grantpt.c b/sysdeps/unix/sysv/linux/grantpt.c
index 0a3cd472fa..8cebde36ed 100644
--- a/sysdeps/unix/sysv/linux/grantpt.c
+++ b/sysdeps/unix/sysv/linux/grantpt.c
@@ -11,7 +11,7 @@
#include "pty-private.h"
-
+#if HAVE_PT_CHOWN
/* Close all file descriptors except the one specified. */
static void
close_all_fds (void)
@@ -38,6 +38,7 @@ close_all_fds (void)
__dup2 (STDOUT_FILENO, STDERR_FILENO);
}
}
-#define CLOSE_ALL_FDS() close_all_fds()
+# define CLOSE_ALL_FDS() close_all_fds()
+#endif
#include <sysdeps/unix/grantpt.c>