Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/resolv/res_query.c,v rcsdiff: /ftp/cvs/cvsroot/src/lib/libc/resolv/res_query.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.11.14.1 retrieving revision 1.12 diff -u -p -r1.11.14.1 -r1.12 --- src/lib/libc/resolv/res_query.c 2011/01/09 20:43:29 1.11.14.1 +++ src/lib/libc/resolv/res_query.c 2009/04/12 17:07:17 1.12 @@ -1,4 +1,4 @@ -/* $NetBSD: res_query.c,v 1.11.14.1 2011/01/09 20:43:29 riz Exp $ */ +/* $NetBSD: res_query.c,v 1.12 2009/04/12 17:07:17 christos Exp $ */ /* * Portions Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") @@ -93,7 +93,7 @@ static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93"; static const char rcsid[] = "Id: res_query.c,v 1.11 2008/11/14 02:36:51 marka Exp"; #else -__RCSID("$NetBSD: res_query.c,v 1.11.14.1 2011/01/09 20:43:29 riz Exp $"); +__RCSID("$NetBSD: res_query.c,v 1.12 2009/04/12 17:07:17 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -454,6 +454,7 @@ res_hostalias(const res_state statp, con file = getenv("HOSTALIASES"); if (file == NULL || (fp = fopen(file, "r")) == NULL) return (NULL); + setbuf(fp, NULL); buf[sizeof(buf) - 1] = '\0'; while (fgets(buf, sizeof(buf), fp)) { for (cp1 = buf; *cp1 && !isspace((unsigned char)*cp1); ++cp1)