Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Paste
P401
Masterwork From Distant Lands
Active
Public
Actions
Authored by
cem
on Jun 25 2020, 1:01 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F6799110: Masterwork From Distant Lands
Jun 25 2020, 1:01 AM
2020-06-25 01:01:23 (UTC+0)
Subscribers
None
files/patch-components_sync__device__info_local__device__info__util__linux.cc
--- components/sync_device_info/local_device_info_util_linux.cc.orig 2020-02-24 18:39:14 UTC
+++ components/sync_device_info/local_device_info_util_linux.cc
@@ -37,8 +37,9 @@ std::string GetPersonalizableDeviceNameInternal() {
#if defined(OS_CHROMEOS)
return GetChromeOSDeviceNameFromType();
#else
- char hostname[HOST_NAME_MAX];
- if (gethostname(hostname, HOST_NAME_MAX) == 0) // Success.
+ int len = sysconf(_SC_HOST_NAME_MAX);
+ char hostname[len];
+ if (gethostname(hostname, _SC_HOST_NAME_MAX) == 0) // Success.
return hostname;
return base::GetLinuxDistro();
#endif
Event Timeline
cem
edited the content of this paste.
(Show Details)
Jun 25 2020, 1:01 AM
2020-06-25 01:01:23 (UTC+0)
cem
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
Log In to Comment