about summary refs log tree commit diff
path: root/inet/rcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'inet/rcmd.c')
-rw-r--r--inet/rcmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c
index b240c8d263..de00bfaf13 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -75,6 +75,7 @@ static char sccsid[] = "@(#)rcmd.c	8.3 (Berkeley) 3/26/94";
 #include <pwd.h>
 #include <errno.h>
 #include <stdio.h>
+#include <stdio_ext.h>
 #include <ctype.h>
 #include <string.h>
 #include <libintl.h>
@@ -437,6 +438,9 @@ iruserfopen (const char *file, uid_t okuser)
       return NULL;
     }
 
+  /* No threads use this stream.  */
+  __fsetlocking (res, FSETLOCKING_BYCALLER);
+
   return res;
 }