diff --git a/gio/gio-launch-desktop.c b/gio/gio-launch-desktop.c index 29bf9d5d4..1703d0cb1 100644 --- a/gio/gio-launch-desktop.c +++ b/gio/gio-launch-desktop.c @@ -39,7 +39,6 @@ #if defined(__linux__) && !defined(__BIONIC__) #include -#include #include #include #include @@ -48,6 +47,9 @@ #include #include "gjournal-private.h" +#define GLIB_COMPILATION +#include "gmacros.h" /* For G_STATIC_ASSERT define */ +#undef GLIB_COMPILATION /* * write_all: @@ -119,8 +121,8 @@ journal_stream_fd (const char *identifier, /* Arbitrary large size for the sending buffer, from systemd */ int large_buffer_size = 8 * 1024 * 1024; - static_assert (LOG_EMERG == 0, "Linux ABI defines LOG_EMERG"); - static_assert (LOG_DEBUG == 7, "Linux ABI defines LOG_DEBUG"); + G_STATIC_ASSERT (LOG_EMERG == 0); + G_STATIC_ASSERT (LOG_DEBUG == 7); fd = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);