From 9bb64f1b8d2252d558f209a04b171d65b5ef131b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 19 Oct 2023 17:09:41 +0200 Subject: [PATCH] pidref: make PIDREF_NULL const That way compiler can put it in an immutable section --- src/basic/pidref.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/pidref.h b/src/basic/pidref.h index 0fdc02a54bb..98ee0fef5c1 100644 --- a/src/basic/pidref.h +++ b/src/basic/pidref.h @@ -9,7 +9,7 @@ typedef struct PidRef { int fd; /* only valid if pidfd are available in the kernel, and we manage to get an fd */ } PidRef; -#define PIDREF_NULL (PidRef) { .fd = -EBADF } +#define PIDREF_NULL (const PidRef) { .fd = -EBADF } /* Turns a pid_t into a PidRef structure on-the-fly *without* acquiring a pidfd for it. (As opposed to * pidref_set_pid() which does so *with* acquiring one, see below) */ -- 2.47.3