mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 03:46:17 +01:00
gutils: Only use the default OS name on Linux
/etc/os-release is a spec designed for Linux. While other OSes can implement it, it doesn't make sense to use Linux as the default value on systems which don't use Linux.
This commit is contained in:
parent
89ad9286d4
commit
00abf67e2c
@ -1418,6 +1418,7 @@ g_get_os_info (const gchar *key_name)
|
||||
g_strfreev (lines);
|
||||
g_free (prefix);
|
||||
|
||||
#ifdef __linux__
|
||||
/* Default values in spec */
|
||||
if (result == NULL)
|
||||
{
|
||||
@ -1428,6 +1429,7 @@ g_get_os_info (const gchar *key_name)
|
||||
if (g_str_equal (key_name, G_OS_INFO_KEY_PRETTY_NAME))
|
||||
return g_strdup ("Linux");
|
||||
}
|
||||
#endif
|
||||
|
||||
return g_steal_pointer (&result);
|
||||
#elif defined (G_OS_WIN32)
|
||||
|
Loading…
Reference in New Issue
Block a user