Skip to content

Commit

Permalink
Restore POSIX uname version fallback code
Browse files Browse the repository at this point in the history
  • Loading branch information
hrubymar10 committed Aug 10, 2018
1 parent dd965e8 commit 1bb926a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/desktop/version.cpp
Expand Up @@ -151,6 +151,22 @@ std::string os_version()
if(!ver.empty()) {
return ver;
}
} else {

//
// POSIX uname version fallback.
//

utsname u;

if(uname(&u) != 0) {
ERR_DU << "os_version: uname error (" << strerror(errno) << ")\n";
}

return formatter() << u.sysname << ' '
<< u.release << ' '
<< u.version << ' '
<< u.machine;
}

#elif defined(_WIN32)
Expand Down

0 comments on commit 1bb926a

Please sign in to comment.