summaryrefslogtreecommitdiff
path: root/libc/misc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-03-25 19:40:43 +0000
committerEric Andersen <andersen@codepoet.org>2002-03-25 19:40:43 +0000
commit3e2a8b618ac5078e449c69bfc430cdb7f53d9b6b (patch)
tree94499c79c20c08e3173324e5f73dfac6b08e3454 /libc/misc
parente06f6917c3363f743b082d2ba986ace206c30914 (diff)
Patch from Steven J. Hill to disable __fsetlocking when
threads are disabled. Bug is my fault. oops. -Erik
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/ttyent/getttyent.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c
index 7784a6ab4..0df2b4a79 100644
--- a/libc/misc/ttyent/getttyent.c
+++ b/libc/misc/ttyent/getttyent.c
@@ -179,7 +179,9 @@ int setttyent(void)
return (1);
} else if ((tf = fopen(_PATH_TTYS, "r"))) {
/* We do the locking ourselves. */
+#ifdef __UCLIBC_HAS_THREADS__
__fsetlocking (tf, FSETLOCKING_BYCALLER);
+#endif
return (1);
}
return (0);