aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2019-06-19 10:26:00 +0200
committerGitHub <[email protected]>2019-06-19 10:26:00 +0200
commit8c1d7e7c1e8d5cc207d80074b14dcbc2b3a32ba8 (patch)
tree718d423ddd3607e7f944171c6439218f78420445 /lib/erl_interface/src
parent5da818c743e619a74eb70073d4d092374fbe79a4 (diff)
parente414c818360911ab759cef6a08b3ed133f3208ae (diff)
downloadotp-8c1d7e7c1e8d5cc207d80074b14dcbc2b3a32ba8.tar.gz
otp-8c1d7e7c1e8d5cc207d80074b14dcbc2b3a32ba8.tar.bz2
otp-8c1d7e7c1e8d5cc207d80074b14dcbc2b3a32ba8.zip
Merge pull request #2110 from NattyNarwhal/aix-fixes/OTP-15866
Wake AIX up from coma
Diffstat (limited to 'lib/erl_interface/src')
-rw-r--r--lib/erl_interface/src/connect/ei_resolve.c12
-rw-r--r--lib/erl_interface/src/misc/ei_portio.c2
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/erl_interface/src/connect/ei_resolve.c b/lib/erl_interface/src/connect/ei_resolve.c
index 225fddc784..5a8ca0c567 100644
--- a/lib/erl_interface/src/connect/ei_resolve.c
+++ b/lib/erl_interface/src/connect/ei_resolve.c
@@ -55,6 +55,16 @@
#include "ei_resolve.h"
#include "ei_locking.h"
+/* AIX has a totally different signature (allegedly shared with some other
+ * Unices) that isn't compatible. It turns out that the _r version isn't
+ * thread-safe according to curl - but bizarrely, since AIX 4.3, libc
+ * is thread-safe in a manner that makes the normal gethostbyname OK
+ * for re-entrant use.
+ */
+#ifdef _AIX
+#undef HAVE_GETHOSTBYNAME_R
+#endif
+
#ifdef HAVE_GETHOSTBYNAME_R
int ei_init_resolve(void)
@@ -75,7 +85,7 @@ int ei_init_resolve(void)
static ei_mutex_t *ei_gethost_sem = NULL;
#endif /* _REENTRANT */
static int ei_resolve_initialized = 0;
-#ifndef __WIN32__
+#if !defined(__WIN32__) && !defined(_AIX)
int h_errno;
#endif
diff --git a/lib/erl_interface/src/misc/ei_portio.c b/lib/erl_interface/src/misc/ei_portio.c
index bccc86c1b1..bfe67a732c 100644
--- a/lib/erl_interface/src/misc/ei_portio.c
+++ b/lib/erl_interface/src/misc/ei_portio.c
@@ -622,7 +622,7 @@ int ei_accept_ctx_t__(ei_socket_callbacks *cbs, void **ctx,
} while (error == EINTR);
}
do {
- error = cbs->accept(ctx, addr, len, ms);
+ error = cbs->EI_ACCEPT_NAME(ctx, addr, len, ms);
} while (error == EINTR);
return error;
}