[glib] gmessages: Fix compilation on Android



commit 620b3c1e567d5504d1276fabeeeae9b3b40d8bf8
Author: Sebastian Dröge <sebastian centricular com>
Date:   Mon Dec 5 12:10:48 2016 +0200

    gmessages: Fix compilation on Android
    
    There is no systemd on Android.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775621

 glib/gmessages.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/glib/gmessages.c b/glib/gmessages.c
index bda571a..2466ae8 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -175,7 +175,7 @@
 #include <locale.h>
 #include <errno.h>
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__BIONIC__)
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -1922,7 +1922,7 @@ g_log_writer_supports_color (gint output_fd)
 #endif
 }
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__BIONIC__)
 static int journal_fd = -1;
 
 #ifndef SOCK_CLOEXEC
@@ -1961,7 +1961,7 @@ open_journal (void)
 gboolean
 g_log_writer_is_journald (gint output_fd)
 {
-#ifdef __linux__
+#if defined(__linux__) && !defined(__BIONIC__)
   /* FIXME: Use the new journal API for detecting whether we’re writing to the
    * journal. See: https://github.com/systemd/systemd/issues/2473
    */
@@ -2096,7 +2096,7 @@ g_log_writer_format_fields (GLogLevelFlags   log_level,
   return g_string_free (gstring, FALSE);
 }
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(__BIONIC__)
 static int
 journal_sendv (struct iovec *iov,
                gsize         iovlen)
@@ -2210,7 +2210,7 @@ g_log_writer_journald (GLogLevelFlags   log_level,
                        gsize            n_fields,
                        gpointer         user_data)
 {
-#ifdef __linux__
+#if defined(__linux__) && !defined(__BIONIC__)
   const char equals = '=';
   const char newline = '\n';
   gsize i, k;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]