mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
pidref: make PIDREF_NULL const
That way compiler can put it in an immutable section
This commit is contained in:
committed by
Luca Boccassi
parent
759cca0348
commit
9bb64f1b8d
@@ -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) */
|
||||
|
||||
Reference in New Issue
Block a user