Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjBarz <jBarz@users.noreply.github.com>2016-12-13 07:56:24 +0300
committerJames M Snell <jasnell@gmail.com>2016-12-28 01:01:49 +0300
commit1c3c75dac286fd64ae1a63170002cd1abd9a6e16 (patch)
treee9d346fb98c33cd3a965d764276d75aa4eb6f6a8 /src/node_os.cc
parent97ab4b29989813a40f5b3f1a8456fb3c7212bb89 (diff)
os: fix os.release() for aix and add test
PR-URL: https://github.com/nodejs/node/pull/10245 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_os.cc')
-rw-r--r--src/node_os.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/node_os.cc b/src/node_os.cc
index d8276f463d6..f8b53e45d8e 100644
--- a/src/node_os.cc
+++ b/src/node_os.cc
@@ -85,7 +85,14 @@ static void GetOSRelease(const FunctionCallbackInfo<Value>& args) {
if (uname(&info) < 0) {
return env->ThrowErrnoException(errno, "uname");
}
+# ifdef _AIX
+ char release[256];
+ snprintf(release, sizeof(release),
+ "%s.%s", info.version, info.release);
+ rval = release;
+# else
rval = info.release;
+# endif
#else // Windows
char release[256];
OSVERSIONINFOW info;