mirror of
https://github.com/morgan9e/systemd
synced 2026-04-16 01:16:10 +09:00
We want to make the header standalone so it includes all the stuff it needs. However, including macro.h for assert_cc() doesn't work because of generate-audit_type-list.sh which would have to become more complex to handle the extra include directories. Instead, let's just use _Static_assert() directly which is a builtin and doesn't need any extra includes.
32 lines
771 B
C
32 lines
771 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
#pragma once
|
|
|
|
#include <linux/audit.h>
|
|
|
|
#if HAVE_AUDIT
|
|
# include <libaudit.h>
|
|
#endif
|
|
|
|
/* We use _Static_assert() directly here instead of assert_cc()
|
|
* because if we include macro.h in this header, the invocation
|
|
* of generate-audit_type-list.sh becomes more complex.
|
|
*/
|
|
|
|
#ifndef AUDIT_SERVICE_START
|
|
# define AUDIT_SERVICE_START 1130 /* Service (daemon) start */
|
|
#else
|
|
_Static_assert(AUDIT_SERVICE_START == 1130, "");
|
|
#endif
|
|
|
|
#ifndef AUDIT_SERVICE_STOP
|
|
# define AUDIT_SERVICE_STOP 1131 /* Service (daemon) stop */
|
|
#else
|
|
_Static_assert(AUDIT_SERVICE_STOP == 1131, "");
|
|
#endif
|
|
|
|
#ifndef MAX_AUDIT_MESSAGE_LENGTH
|
|
# define MAX_AUDIT_MESSAGE_LENGTH 8970
|
|
#else
|
|
_Static_assert(MAX_AUDIT_MESSAGE_LENGTH == 8970, "");
|
|
#endif
|