summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking/libc
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libnetworking/libc')
-rw-r--r--cpukit/libnetworking/libc/gethostnamadr.c12
-rw-r--r--cpukit/libnetworking/libc/getservbyname.c19
-rw-r--r--cpukit/libnetworking/libc/getservbyport.c18
3 files changed, 49 insertions, 0 deletions
diff --git a/cpukit/libnetworking/libc/gethostnamadr.c b/cpukit/libnetworking/libc/gethostnamadr.c
index 19c05b31ba..4dc18840e0 100644
--- a/cpukit/libnetworking/libc/gethostnamadr.c
+++ b/cpukit/libnetworking/libc/gethostnamadr.c
@@ -158,6 +158,18 @@ gethostbyname2(const char *name, int type)
return hp;
}
+int gethostbyaddr_r(const void *addr, socklen_t len, int type,
+ struct hostent *ret, char *buf, size_t buflen,
+ struct hostent **result, int *h_errnop)
+{
+ #warning "implement a proper gethostbyaddr_r"
+
+ *result = gethostbyaddr( addr, len, type );
+ if ( *result )
+ return 0;
+ return -1;
+}
+
struct hostent *
gethostbyaddr(const void *addr, socklen_t len, int type)
{
diff --git a/cpukit/libnetworking/libc/getservbyname.c b/cpukit/libnetworking/libc/getservbyname.c
index 2481acdd1f..f77a56a203 100644
--- a/cpukit/libnetworking/libc/getservbyname.c
+++ b/cpukit/libnetworking/libc/getservbyname.c
@@ -42,6 +42,25 @@
extern int _serv_stayopen;
+int getservbyname_r(
+ const char *name,
+ const char *proto,
+ struct servent *result_buf,
+ char *buf,
+ size_t buflen,
+ struct servent **result
+)
+{
+ #warning "implement a proper getservbyport_r"
+
+ *result = getservbyname(name, proto);
+ if ( *result )
+ return 0;
+
+ return -1;
+}
+
+
struct servent *
getservbyname(name, proto)
const char *name, *proto;
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;