mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibCore: Remove SerenityOS specific version number code
This commit is contained in:
parent
ebb8342cf2
commit
e815847f86
Notes:
github-actions[bot]
2024-10-29 13:31:28 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/e815847f86d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1940 Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 0 additions and 16 deletions
|
@ -7,27 +7,11 @@
|
|||
#include <AK/String.h>
|
||||
#include <LibCore/Version.h>
|
||||
|
||||
#ifdef AK_OS_SERENITY
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
namespace Core::Version {
|
||||
|
||||
ErrorOr<String> read_long_version_string()
|
||||
{
|
||||
#ifdef AK_OS_SERENITY
|
||||
struct utsname uts;
|
||||
int rc = uname(&uts);
|
||||
if ((rc) < 0) {
|
||||
return Error::from_syscall("uname"sv, rc);
|
||||
}
|
||||
auto const* version = uts.release;
|
||||
auto const* git_hash = uts.version;
|
||||
|
||||
return String::formatted("Version {} revision {}", version, git_hash);
|
||||
#else
|
||||
return "Version 1.0"_string;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue