diff options
author | Calvin Buckley <[email protected]> | 2019-01-25 12:29:05 -0500 |
---|---|---|
committer | Calvin <[email protected]> | 2019-05-29 06:21:42 -0400 |
commit | be673b3a01f8039679ff87e637fd943bb81912fc (patch) | |
tree | 6f2e4226d01029154d867725a35ce3f078b8d35a /erts | |
parent | 2318be71e96021613b1077acca66bba4fce0a71c (diff) | |
download | otp-be673b3a01f8039679ff87e637fd943bb81912fc.tar.gz otp-be673b3a01f8039679ff87e637fd943bb81912fc.tar.bz2 otp-be673b3a01f8039679ff87e637fd943bb81912fc.zip |
AIX formats utsname different for version numbers
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/sys/unix/sys.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c index 4823e549ea..78866b356c 100644 --- a/erts/emulator/sys/unix/sys.c +++ b/erts/emulator/sys/unix/sys.c @@ -740,10 +740,17 @@ void os_version(int *pMajor, int *pMinor, int *pBuild) { * X.Y or X.Y.Z. */ (void) uname(&uts); +#ifdef _AIX + /* AIX stores the major in version and minor in release */ + *pMajor = atoi(uts.version); + *pMinor = atoi(uts.release); + *pBuild = 0; /* XXX: get oslevel for AIX or TR on i */ +#else release = uts.release; *pMajor = get_number(&release); /* Pointer to major version. */ *pMinor = get_number(&release); /* Pointer to minor version. */ *pBuild = get_number(&release); /* Pointer to build number. */ +#endif } void erts_do_break_handling(void) |