From a908b213473ad38dc125e4bc5e3bae0766a3d8e2 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Thu, 9 Feb 2017 16:07:53 -0500 Subject: [PATCH] aix: improve readability of os version uname on AIX reports, e.g. 6.1 as version == 6, release == 1. The code was previously printing this as: OS version: AIX 1 6 Fix so that on AIX this is now: OS version: AIX 6.1 --- src/node_report.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node_report.cc b/src/node_report.cc index 69c6b1c..855e90b 100644 --- a/src/node_report.cc +++ b/src/node_report.cc @@ -617,7 +617,11 @@ static void PrintVersionInformation(FILE* fp, Isolate* isolate) { // Print operating system and machine information (Unix/OSX) struct utsname os_info; if (uname(&os_info) == 0) { +#if defined(_AIX) + fprintf(fp, "\nOS version: %s %s.%s\n", os_info.sysname, os_info.version, os_info.release); +#else fprintf(fp, "\nOS version: %s %s %s\n", os_info.sysname, os_info.release, os_info.version); +#endif #if defined(__GLIBC__) fprintf(fp, "(glibc: %d.%d)\n", __GLIBC__, __GLIBC_MINOR__); #endif