summaryrefslogtreecommitdiff
path: root/libc/misc/internals/__h_errno_location.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-02-26 09:35:50 +0000
committerEric Andersen <andersen@codepoet.org>2002-02-26 09:35:50 +0000
commit033c0d7edcb04845b31ca09ae87f9c25acab975d (patch)
tree363dc134e08512eb9ae8e40b75ef86cda828baa6 /libc/misc/internals/__h_errno_location.c
parent2c81c415ceda41331df567ba97ab5cdf98211107 (diff)
Proper support for setting h_errno
Diffstat (limited to 'libc/misc/internals/__h_errno_location.c')
-rw-r--r--libc/misc/internals/__h_errno_location.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c
new file mode 100644
index 000000000..f4f598057
--- /dev/null
+++ b/libc/misc/internals/__h_errno_location.c
@@ -0,0 +1,10 @@
+#define __FORCE_GLIBC
+#include <features.h>
+#include <netdb.h>
+#undef h_errno
+
+int * weak_const_function __h_errno_location (void)
+{
+ return &h_errno;
+}
+