diff options
-rw-r--r-- | cpukit/libnetworking/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libnetworking/libc/getproto.c | 5 | ||||
-rw-r--r-- | cpukit/libnetworking/libc/getprotoname.c | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/cpukit/libnetworking/ChangeLog b/cpukit/libnetworking/ChangeLog index 63ca432386..ddfe2aa80d 100644 --- a/cpukit/libnetworking/ChangeLog +++ b/cpukit/libnetworking/ChangeLog @@ -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, diff --git a/cpukit/libnetworking/libc/getproto.c b/cpukit/libnetworking/libc/getproto.c index c2a653f4b4..67f59b4e86 100644 --- a/cpukit/libnetworking/libc/getproto.c +++ b/cpukit/libnetworking/libc/getproto.c @@ -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); } diff --git a/cpukit/libnetworking/libc/getprotoname.c b/cpukit/libnetworking/libc/getprotoname.c index 46880eb005..e21e4c4f2a 100644 --- a/cpukit/libnetworking/libc/getprotoname.c +++ b/cpukit/libnetworking/libc/getprotoname.c @@ -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); } |