summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-daemon/sd-daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-daemon/sd-daemon.c')
-rw-r--r--src/libsystemd/sd-daemon/sd-daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/sd-daemon/sd-daemon.c
index 8dc11aeb30..f2f295d6e4 100644
--- a/src/libsystemd/sd-daemon/sd-daemon.c
+++ b/src/libsystemd/sd-daemon/sd-daemon.c
@@ -567,7 +567,7 @@ _public_ int sd_pid_notify_with_fds(
cmsg->cmsg_type = SCM_CREDENTIALS;
cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred));
- ucred = (struct ucred*) CMSG_DATA(cmsg);
+ ucred = CMSG_TYPED_DATA(cmsg, struct ucred);
ucred->pid = pid != 0 ? pid : getpid_cached();
ucred->uid = getuid();
ucred->gid = getgid();