From f3bcaf9f88aad2c423ebcd61121562f9834187d4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Apr 2024 17:11:27 +0200 Subject: Merging upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- xpcom/base/nsSystemInfo.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xpcom/base') diff --git a/xpcom/base/nsSystemInfo.cpp b/xpcom/base/nsSystemInfo.cpp index 9febabaad7..9a389f6938 100644 --- a/xpcom/base/nsSystemInfo.cpp +++ b/xpcom/base/nsSystemInfo.cpp @@ -57,6 +57,7 @@ # include # include # include "mozilla/Tokenizer.h" +# include "mozilla/widget/LSBUtils.h" # include "nsCharSeparatedTokenizer.h" # include @@ -1139,6 +1140,14 @@ nsresult nsSystemInfo::Init() { SetupAndroidInfo(info); #endif +#if defined(XP_LINUX) && !defined(ANDROID) + nsCString dist, desc, release, codename; + if (widget::lsb::GetLSBRelease(dist, desc, release, codename)) { + SetPropertyAsACString(u"distro"_ns, dist); + SetPropertyAsACString(u"distroVersion"_ns, release); + } +#endif + #if defined(XP_LINUX) && defined(MOZ_SANDBOX) SandboxInfo sandInfo = SandboxInfo::Get(); -- cgit v1.2.3