diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 44bc4e1be15..1b0049ba268 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -1296,6 +1296,9 @@ static void IsIPv6(const FunctionCallbackInfo& args) { void CanonicalizeIP(const FunctionCallbackInfo& args) { v8::Isolate* isolate = args.GetIsolate(); node::Utf8Value ip(isolate, args[0]); +#ifdef __MVS__ + __a2e_s(*ip); +#endif char address_buffer[sizeof(struct in6_addr)]; char canonical_ip[INET6_ADDRSTRLEN]; @@ -1311,6 +1314,9 @@ void CanonicalizeIP(const FunctionCallbackInfo& args) { sizeof(canonical_ip)); CHECK_EQ(err, 0); +#ifdef __MVS__ + __e2a_s(canonical_ip); +#endif args.GetReturnValue().Set(String::NewFromUtf8(isolate, canonical_ip)); }