From 1fbd0bafe7671fce033f7672f35690c8324aaff9 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 2 Jul 2008 13:40:19 +0000 Subject: 2008-07-02 Joel Sherrill * libnetworking/Makefile.am, libnetworking/libc/gethostnamadr.c, libnetworking/libc/getservbyname.c, libnetworking/libc/getservbyport.c: Add initial versions of getservbyport_r(), gethostbyaddr_r(), and getservbyport_r(). At this point they are just simple weappers for the version without the _r in the name. --- cpukit/libnetworking/libc/getservbyport.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'cpukit/libnetworking/libc/getservbyport.c') diff --git a/cpukit/libnetworking/libc/getservbyport.c b/cpukit/libnetworking/libc/getservbyport.c index cdc9557b9c..884d600590 100644 --- a/cpukit/libnetworking/libc/getservbyport.c +++ b/cpukit/libnetworking/libc/getservbyport.c @@ -42,6 +42,24 @@ extern int _serv_stayopen; +int getservbyport_r( + int port, + const char *proto, + struct servent *result_buf, + char *buf, + size_t buflen, + struct servent **result +) +{ + #warning "implement a proper getservbyport_r" + + *result = getservbyport(port, proto); + if ( *result ) + return 0; + + return -1; +} + struct servent * getservbyport(port, proto) int port; -- cgit v1.2.3