mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-06-26 22:24:51 +02:00
gio-launch-desktop, gmessages: Fix journald support using __BIONIC__ to skip support on Android
As per the Bionic docs, this functionality is Android, not bionic specific. See: https://android.googlesource.com/platform/bionic/+/HEAD/docs/defines.md
This commit is contained in:
parent
b907e28454
commit
0da4b1bf31
@ -37,7 +37,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if defined(__linux__) && !defined(__BIONIC__)
|
#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@ -252,7 +252,7 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
putenv (buf);
|
putenv (buf);
|
||||||
|
|
||||||
#if defined(__linux__) && !defined(__BIONIC__)
|
#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
set_up_journal (argv[1]);
|
set_up_journal (argv[1]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "gjournal-private.h"
|
#include "gjournal-private.h"
|
||||||
|
|
||||||
#if defined(__linux__) && !defined(__BIONIC__)
|
#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(__linux__) && !defined(__BIONIC__)
|
#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
@ -68,7 +68,7 @@
|
|||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__linux__) && !defined(__BIONIC__)
|
#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
#include "gjournal-private.h"
|
#include "gjournal-private.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2053,7 +2053,7 @@ G_LOCK_DEFINE_STATIC (syslog_opened);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__linux__) && !defined(__BIONIC__)
|
#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
static int journal_fd = -1;
|
static int journal_fd = -1;
|
||||||
|
|
||||||
#ifndef SOCK_CLOEXEC
|
#ifndef SOCK_CLOEXEC
|
||||||
@ -2098,7 +2098,7 @@ open_journal (void)
|
|||||||
gboolean
|
gboolean
|
||||||
g_log_writer_is_journald (gint output_fd)
|
g_log_writer_is_journald (gint output_fd)
|
||||||
{
|
{
|
||||||
#if defined(__linux__) && !defined(__BIONIC__)
|
#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
return _g_fd_is_journal (output_fd);
|
return _g_fd_is_journal (output_fd);
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -2350,7 +2350,7 @@ g_log_writer_syslog (GLogLevelFlags log_level,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Enable support for the journal if we're on a recent enough Linux */
|
/* Enable support for the journal if we're on a recent enough Linux */
|
||||||
#if defined(__linux__) && !defined(__BIONIC__) && defined(HAVE_MKOSTEMP) && defined(O_CLOEXEC)
|
#if defined(__linux__) && !defined(__ANDROID__) && defined(HAVE_MKOSTEMP) && defined(O_CLOEXEC)
|
||||||
#define ENABLE_JOURNAL_SENDV
|
#define ENABLE_JOURNAL_SENDV
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user