summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-10-19 17:09:41 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2023-10-19 19:59:51 +0200
commit9bb64f1b8d2252d558f209a04b171d65b5ef131b (patch)
tree1065bca3b9298e595ddb6ae75107f414549bd106 /src
parentMerge pull request #29629 from bluca/mount_tunnel_pidref (diff)
downloadsystemd-9bb64f1b8d2252d558f209a04b171d65b5ef131b.tar.xz
systemd-9bb64f1b8d2252d558f209a04b171d65b5ef131b.zip
pidref: make PIDREF_NULL const
That way compiler can put it in an immutable section
Diffstat (limited to 'src')
-rw-r--r--src/basic/pidref.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/pidref.h b/src/basic/pidref.h
index 0fdc02a54b..98ee0fef5c 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) */