summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);