summary refs log tree commit diff
path: root/resolv/res_hconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/res_hconf.c')
-rw-r--r--resolv/res_hconf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c
index 50e49830f5..ab97e39554 100644
--- a/resolv/res_hconf.c
+++ b/resolv/res_hconf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1993,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger (davidm@azstarnet.com).
 
@@ -33,6 +33,7 @@
 #include <ctype.h>
 #include <memory.h>
 #include <stdio.h>
+#include <stdio_ext.h>
 #include <stdlib.h>
 #include <string.h>
 #include <net/if.h>
@@ -338,6 +339,9 @@ _res_hconf_init (void)
     _res_hconf.service[_res_hconf.num_services++] = SERVICE_BIND;
   else
     {
+      /* No threads using this stream.  */
+      __fsetlocking (fp, FSETLOCKING_BYCALLER);
+
       while (fgets_unlocked (buf, sizeof (buf), fp))
 	{
 	  ++line_num;