[glib/wip/pwithnall/macos-werror: 1/2] gutils: Disable some dead code on macOS
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/pwithnall/macos-werror: 1/2] gutils: Disable some dead code on macOS
- Date: Wed, 17 Nov 2021 15:44:52 +0000 (UTC)
commit 345bafa92fc72a61d801b660a9cd16d647fb4858
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed Nov 17 15:43:31 2021 +0000
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>
glib/gutils.c | 4 ++--
glib/tests/utils.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glib/gutils.c b/glib/gutils.c
index b744f2510..a6b30ae0f 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -1368,7 +1368,7 @@ get_windows_version (gboolean with_windows)
}
#endif
-#ifdef G_OS_UNIX
+#if defined (G_OS_UNIX) && !defined (__APPLE__)
static gchar *
get_os_info_from_os_release (const gchar *key_name,
const gchar *buffer)
@@ -1497,7 +1497,7 @@ get_os_info_from_uname (const gchar *key_name)
else
return NULL;
}
-#endif
+#endif /* defined (G_OS_UNIX) && !defined (__APPLE__) */
/**
* g_get_os_info:
diff --git a/glib/tests/utils.c b/glib/tests/utils.c
index f47e3595c..aafa000af 100644
--- a/glib/tests/utils.c
+++ b/glib/tests/utils.c
@@ -553,7 +553,7 @@ test_os_info (void)
{
gchar *name;
gchar *contents = NULL;
-#ifdef G_OS_UNIX
+#if defined (G_OS_UNIX) && !(defined (G_OS_WIN32) || defined (__APPLE__))
struct utsname info;
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]