diff options
Diffstat (limited to 'www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc')
-rw-r--r-- | www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc b/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc index 975f84791e06..79d961d9684c 100644 --- a/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc +++ b/www/chromium/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc @@ -1,4 +1,4 @@ ---- components/policy/core/common/cloud/cloud_policy_util.cc.orig 2021-12-31 00:57:30 UTC +--- components/policy/core/common/cloud/cloud_policy_util.cc.orig 2022-02-07 13:39:41 UTC +++ components/policy/core/common/cloud/cloud_policy_util.cc @@ -18,7 +18,7 @@ #include <wincred.h> @@ -9,7 +9,7 @@ #include <pwd.h> #include <sys/types.h> #include <unistd.h> -@@ -33,7 +33,7 @@ +@@ -33,10 +33,14 @@ #import <SystemConfiguration/SCDynamicStoreCopySpecific.h> #endif @@ -18,7 +18,14 @@ #include <limits.h> // For HOST_NAME_MAX #endif -@@ -67,7 +67,7 @@ ++#if defined(OS_FREEBSD) ++#define HOST_NAME_MAX MAXHOSTNAMELEN ++#endif ++ + #include <utility> + + #include "base/check.h" +@@ -67,7 +71,7 @@ #include "base/system/sys_info.h" #endif @@ -27,26 +34,24 @@ #include "base/system/sys_info.h" #endif -@@ -85,6 +85,10 @@ std::string GetMachineName() { +@@ -80,7 +84,7 @@ namespace policy { + namespace em = enterprise_management; + + std::string GetMachineName() { +-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) ++#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD) + char hostname[HOST_NAME_MAX]; if (gethostname(hostname, HOST_NAME_MAX) == 0) // Success. return hostname; - return std::string(); -+#elif defined(OS_BSD) -+ char hostname[MAXHOSTNAMELEN]; -+ if (gethostname(hostname, MAXHOSTNAMELEN) == 0) -+ return hostname; - #elif defined(OS_IOS) - // Use the Vendor ID as the machine name. - return ios::device_util::GetVendorId(); -@@ -137,7 +141,7 @@ std::string GetMachineName() { - } +@@ -138,7 +142,7 @@ std::string GetMachineName() { std::string GetOSVersion() { --#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_APPLE) || \ -+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_APPLE) || defined(OS_BSD) || \ - defined(OS_ANDROID) || defined(OS_FUCHSIA) + #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_APPLE) || \ +- defined(OS_ANDROID) || defined(OS_FUCHSIA) ++ defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) return base::SysInfo::OperatingSystemVersion(); #elif defined(OS_WIN) + base::win::OSInfo::VersionNumber version_number = @@ -161,7 +165,7 @@ std::string GetOSArchitecture() { } |