gio-launch-desktop: replace static_assert with G_STATIC_ASSERT

This commit is contained in:
Owen Rafferty 2022-08-15 01:41:50 -05:00
parent 663a7959ca
commit c850a06ea2
No known key found for this signature in database
GPG Key ID: A68B10E2554DEBCB

View File

@ -39,7 +39,6 @@
#if defined(__linux__) && !defined(__BIONIC__)
#include <alloca.h>
#include <assert.h>
#include <errno.h>
#include <stddef.h>
#include <string.h>
@ -48,6 +47,9 @@
#include <sys/un.h>
#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);