summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2003-01-27 16:20:14 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2003-01-27 16:20:14 +0000
commit9d647dfc304fce778fe90578a41b7af72b2f9902 (patch)
tree086b99279c551b12490351f5be875bd5f652217c /cpukit/libnetworking
parent2003-01-27 Dan Smisko <dan@balanced.com> (diff)
downloadrtems-9d647dfc304fce778fe90578a41b7af72b2f9902.tar.bz2
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.
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/ChangeLog5
-rw-r--r--cpukit/libnetworking/libc/getproto.c5
-rw-r--r--cpukit/libnetworking/libc/getprotoname.c5
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);
}