diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-07-02 13:40:19 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-07-02 13:40:19 +0000 |
commit | 1fbd0bafe7671fce033f7672f35690c8324aaff9 (patch) | |
tree | 7bb6ef7b1a76541ad91655e53dd21185282e3b5d /cpukit/libnetworking/libc/gethostnamadr.c | |
parent | 2008-07-02 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-1fbd0bafe7671fce033f7672f35690c8324aaff9.tar.bz2 |
2008-07-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* 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.
Diffstat (limited to 'cpukit/libnetworking/libc/gethostnamadr.c')
-rw-r--r-- | cpukit/libnetworking/libc/gethostnamadr.c | 12 |
1 files changed, 12 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) { |