summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-09-25 13:23:05 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-09-25 13:23:05 +0000
commit0a592be6fb966180eab9a8fc8231e46b5a3d77a6 (patch)
treefcf4a66cbc683fbb680a6f515d17dcd7e0858f90
parentb4143709718f3326449f9860bdc08597c59bb826 (diff)
- fix compilation of legacy mode
-rw-r--r--libc/stdlib/getpt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libc/stdlib/getpt.c b/libc/stdlib/getpt.c
index 3033a13aa..37ba78ab1 100644
--- a/libc/stdlib/getpt.c
+++ b/libc/stdlib/getpt.c
@@ -74,14 +74,19 @@ posix_openpt (int flags)
/* Check that the /dev/pts filesystem is mounted
or if /dev is a devfs filesystem (this implies /dev/pts). */
- if ((_state & devpts_mounted)
- || (__libc_statfs (_PATH_DEVPTS, &fsbuf) == 0
+ if (
+#if !defined __UNIX98PTY_ONLY__
+ (_state & devpts_mounted) ||
+#endif
+ (__libc_statfs (_PATH_DEVPTS, &fsbuf) == 0
&& fsbuf.f_type == DEVPTS_SUPER_MAGIC)
|| (__libc_statfs (_PATH_DEV, &fsbuf) == 0
&& fsbuf.f_type == DEVFS_SUPER_MAGIC))
{
/* Everything is ok. */
+#if !defined __UNIX98PTY_ONLY__
_state |= devpts_mounted;
+#endif
return fd;
}