aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-16 14:31:47 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-16 14:31:47 -0800
commit72972e7102e8a7c94f576e841749d2e7c4b432d0 (patch)
treef058827faf99ae8fdfbe9579fc145348a7ae638a /src
parent62de2bd37e003763733b3147ea32164a68e5962e (diff)
add __h_errno; fixes #2013
Diffstat (limited to 'src')
-rw-r--r--src/library.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 69569601..eda4a0b7 100644
--- a/src/library.js
+++ b/src/library.js
@@ -7344,6 +7344,12 @@ LibraryManager.library = {
// netdb.h
// ==========================================================================
+ __h_errno_state: 'allocate(1, "i32", ALLOC_STATIC)',
+ __h_errno_location__deps: ['__h_errno_state'],
+ __h_errno_location: function() {
+ return ___h_errno_state;
+ },
+
// We can't actually resolve hostnames in the browser, so instead
// we're generating fake IP addresses with lookup_name that we can
// resolve later on with lookup_addr.
@@ -7399,6 +7405,7 @@ LibraryManager.library = {
gethostbyaddr: function (addr, addrlen, type) {
if (type !== {{{ cDefine('AF_INET') }}}) {
___setErrNo(ERRNO_CODES.EAFNOSUPPORT);
+ // TODO: set h_errno
return null;
}
addr = {{{ makeGetValue('addr', '0', 'i32') }}}; // addr is in_addr