diff options
author | jBarz <jBarz@users.noreply.github.com> | 2016-12-13 07:56:24 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-12-28 01:01:49 +0300 |
commit | 1c3c75dac286fd64ae1a63170002cd1abd9a6e16 (patch) | |
tree | e9d346fb98c33cd3a965d764276d75aa4eb6f6a8 /src/node_os.cc | |
parent | 97ab4b29989813a40f5b3f1a8456fb3c7212bb89 (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.cc | 7 |
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; |