about summary refs log tree commit diff
path: root/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_hconf.c4
-rw-r--r--resolv/res_init.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c
index cde0229330..6693b1216e 100644
--- a/resolv/res_hconf.c
+++ b/resolv/res_hconf.c
@@ -46,6 +46,10 @@
 #include "res_hconf.h"
 #include <wchar.h>
 
+#if IS_IN (libc)
+# define fgets_unlocked __fgets_unlocked
+#endif
+
 #define _PATH_HOSTCONF	"/etc/host.conf"
 
 /* Environment vars that all user to override default behavior:  */
diff --git a/resolv/res_init.c b/resolv/res_init.c
index ea133f8d82..90760ec8e6 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -238,7 +238,7 @@ __res_vinit(res_state statp, int preinit) {
 	    /* No threads use this stream.  */
 	    __fsetlocking (fp, FSETLOCKING_BYCALLER);
 	    /* read the config file */
-	    while (fgets_unlocked(buf, sizeof(buf), fp) != NULL) {
+	    while (__fgets_unlocked(buf, sizeof(buf), fp) != NULL) {
 		/* skip comments */
 		if (*buf == ';' || *buf == '#')
 			continue;