gutils: Disable some dead code on macOS

This code isn’t used when building on macOS, so ifdef it out to avoid a
compiler warning.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2021-11-17 15:43:31 +00:00
parent 81a31fd062
commit 6554af0320
2 changed files with 3 additions and 3 deletions

View File

@ -1368,7 +1368,7 @@ get_windows_version (gboolean with_windows)
} }
#endif #endif
#ifdef G_OS_UNIX #if defined (G_OS_UNIX) && !defined (__APPLE__)
static gchar * static gchar *
get_os_info_from_os_release (const gchar *key_name, get_os_info_from_os_release (const gchar *key_name,
const gchar *buffer) const gchar *buffer)
@ -1497,7 +1497,7 @@ get_os_info_from_uname (const gchar *key_name)
else else
return NULL; return NULL;
} }
#endif #endif /* defined (G_OS_UNIX) && !defined (__APPLE__) */
/** /**
* g_get_os_info: * g_get_os_info:

View File

@ -553,7 +553,7 @@ test_os_info (void)
{ {
gchar *name; gchar *name;
gchar *contents = NULL; gchar *contents = NULL;
#ifdef G_OS_UNIX #if defined (G_OS_UNIX) && !(defined (G_OS_WIN32) || defined (__APPLE__))
struct utsname info; struct utsname info;
#endif #endif