Merge branch 'main' into 'main'

gio-launch-desktop: replace static_assert with G_STATIC_ASSERT

Closes #2713

See merge request GNOME/glib!2858
This commit is contained in:
Marco Trevisan 2022-08-31 15:06:27 +00:00
commit 2ef66ba386

View File

@ -39,7 +39,6 @@
#if defined(__linux__) && !defined(__BIONIC__) #if defined(__linux__) && !defined(__BIONIC__)
#include <alloca.h> #include <alloca.h>
#include <assert.h>
#include <errno.h> #include <errno.h>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
@ -48,6 +47,9 @@
#include <sys/un.h> #include <sys/un.h>
#include "gjournal-private.h" #include "gjournal-private.h"
#define GLIB_COMPILATION
#include "gmacros.h" /* For G_STATIC_ASSERT define */
#undef GLIB_COMPILATION
/* /*
* write_all: * write_all:
@ -119,8 +121,8 @@ journal_stream_fd (const char *identifier,
/* Arbitrary large size for the sending buffer, from systemd */ /* Arbitrary large size for the sending buffer, from systemd */
int large_buffer_size = 8 * 1024 * 1024; int large_buffer_size = 8 * 1024 * 1024;
static_assert (LOG_EMERG == 0, "Linux ABI defines LOG_EMERG"); G_STATIC_ASSERT (LOG_EMERG == 0 && "Linux ABI defines LOG_EMERG");
static_assert (LOG_DEBUG == 7, "Linux ABI defines LOG_DEBUG"); G_STATIC_ASSERT (LOG_DEBUG == 7 && "Linux ABI defines LOG_DEBUG");
fd = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); fd = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);