summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking/libc/herror.c
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2016-05-02 14:49:32 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-28 13:01:38 +0200
commit232d6fecb6c699298e21929d3edbf9e8328501d9 (patch)
tree52667d63e33bde26087461a176a476b089edd0c0 /cpukit/libnetworking/libc/herror.c
parentlibnetworking: Add <rtems/rtems_netdb.h> (diff)
downloadrtems-232d6fecb6c699298e21929d3edbf9e8328501d9.tar.bz2
libnetworking: Import current <netdb.h>
Import the <netdb.h> from current FreeBSD. This allows to build some current software (e.g. libressl). Add __h_errno(). Update gethostent_r() API. Linux and FreeBSD use a common API now. Adapt the RTEMS one to provide the same one. Match gethostbyname_r() with prototype.
Diffstat (limited to '')
-rw-r--r--cpukit/libnetworking/libc/herror.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpukit/libnetworking/libc/herror.c b/cpukit/libnetworking/libc/herror.c
index e7d6ba48cb..bb1112f336 100644
--- a/cpukit/libnetworking/libc/herror.c
+++ b/cpukit/libnetworking/libc/herror.c
@@ -67,7 +67,13 @@ const char *h_errlist[] = {
};
int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
-int h_errno;
+int *
+__h_errno(void)
+{
+ static int the_h_errno;
+
+ return &the_h_errno;
+}
#define HERROR_USE_WRITEV