diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2020-12-07 18:28:04 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2020-12-07 18:28:04 +0000 |
commit | 86312d159d55e99db5a5c82d9c50f31a1fe28199 (patch) | |
tree | 0f9f94e6c6d223df2f4beb3247c96e510ff0804d /src/libunixonacid/ancil_send_fd.c | |
parent | 2ddd93b4423b94578868e2701c265f8da4350965 (diff) | |
download | skalibs-86312d159d55e99db5a5c82d9c50f31a1fe28199.tar.xz |
Some trivial bugfixes and cleanups
Diffstat (limited to 'src/libunixonacid/ancil_send_fd.c')
-rw-r--r-- | src/libunixonacid/ancil_send_fd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libunixonacid/ancil_send_fd.c b/src/libunixonacid/ancil_send_fd.c index 939d06c..5573d5c 100644 --- a/src/libunixonacid/ancil_send_fd.c +++ b/src/libunixonacid/ancil_send_fd.c @@ -35,7 +35,7 @@ int ancil_send_fd (int sock, int fd, char ch) c->cmsg_level = SOL_SOCKET ; c->cmsg_type = SCM_RIGHTS ; c->cmsg_len = CMSG_LEN(sizeof(int)) ; - *(int *)CMSG_DATA(c) = fd ; + memcpy(CMSG_DATA(c), &fd, sizeof(int)) ; do r = sendmsg(sock, &hdr, MSG_NOSIGNAL) ; while (r < 0 && errno == EINTR) ; if (r <= 0) return 0 ; |