aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ic/test/c_client_erl_server_proto_SUITE_data
diff options
context:
space:
mode:
authorDeepak Goel <[email protected]>2017-02-15 15:13:38 -0800
committerDeepak Goel <[email protected]>2017-03-22 15:42:22 -0700
commit3fcf58b142e22adb754b312576570c904655f877 (patch)
tree5e0630d7ca5b6544f2d1db3c66b2a26a70f2f85e /lib/ic/test/c_client_erl_server_proto_SUITE_data
parentaa315e1cf1b79ab782e5b4c944595495ebf4e2f4 (diff)
downloadotp-3fcf58b142e22adb754b312576570c904655f877.tar.gz
otp-3fcf58b142e22adb754b312576570c904655f877.tar.bz2
otp-3fcf58b142e22adb754b312576570c904655f877.zip
This patch fixes the issue in which erlang fails to start
if the hostname is 64 characters on a linux system.
Diffstat (limited to 'lib/ic/test/c_client_erl_server_proto_SUITE_data')
-rw-r--r--lib/ic/test/c_client_erl_server_proto_SUITE_data/c_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ic/test/c_client_erl_server_proto_SUITE_data/c_client.c b/lib/ic/test/c_client_erl_server_proto_SUITE_data/c_client.c
index b7609d63e5..40c7328f03 100644
--- a/lib/ic/test/c_client_erl_server_proto_SUITE_data/c_client.c
+++ b/lib/ic/test/c_client_erl_server_proto_SUITE_data/c_client.c
@@ -61,7 +61,7 @@
#include "erl_interface.h"
#include "m_i.h"
-#define HOSTNAMESZ 256
+#define HOSTNAMESZ 255
#define NODENAMESZ 512
#define INBUFSZ 10
@@ -298,7 +298,7 @@ int main(int argc, char **argv)
progname = argv[0];
host[HOSTNAMESZ] = '\0';
- if (gethostname(host, HOSTNAMESZ) < 0) {
+ if (gethostname(host, HOSTNAMESZ + 1) < 0) {
fprintf(stderr, "Can't find own hostname\n");
done(1);
}