From: Lennart Poettering Date: Thu, 19 Oct 2023 15:09:41 +0000 (+0200) Subject: pidref: make PIDREF_NULL const X-Git-Tag: v255-rc1~195 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9bb64f1b8d2252d558f209a04b171d65b5ef131b;p=thirdparty%2Fsystemd.git pidref: make PIDREF_NULL const That way compiler can put it in an immutable section --- 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) */