2003-01-27 Till Straumann <strauman@SLAC.Stanford.edu>

* libc/getproto.c, libc/getprotoname.c: modification to call
	getprotoent_static() if fopen() on /etc/protocols fails.
This commit is contained in:
Joel Sherrill
2003-01-27 16:20:14 +00:00
parent f6c2c30ed4
commit 9d647dfc30
3 changed files with 15 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2003-01-27 Till Straumann <strauman@SLAC.Stanford.edu>
* libc/getproto.c, libc/getprotoname.c: modification to call
getprotoent_static() if fopen() on /etc/protocols fails.
2003-01-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* netinet/tcp_subr.c: Add args to INP_INFO_RLOCK, INP_INFO_RUNLOCK,

View File

@@ -41,6 +41,8 @@ static char sccsid[] = "@(#)getproto.c 8.1 (Berkeley) 6/4/93";
extern int _proto_stayopen;
extern struct protoent * getprotobynumber_static(int);
struct protoent *
getprotobynumber(proto)
register int proto;
@@ -53,5 +55,8 @@ getprotobynumber(proto)
break;
if (!_proto_stayopen)
endprotoent();
if ( !p )
p = getprotobynumber_static(proto);
return (p);
}

View File

@@ -42,6 +42,8 @@ static char sccsid[] = "@(#)getprotoname.c 8.1 (Berkeley) 6/4/93";
extern int _proto_stayopen;
extern struct protoent *getprotobyname_static(const char *);
struct protoent *
getprotobyname(name)
register const char *name;
@@ -60,5 +62,8 @@ getprotobyname(name)
found:
if (!_proto_stayopen)
endprotoent();
if ( !p )
p = getprotobyname_static(name);
return (p);
}