diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-20 23:15:16 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-20 23:15:16 +0000 |
commit | 828159d33b8ced9e016470c61ffd66bbef048e06 (patch) | |
tree | 5c739a3ffc9001b34730c1a08334e3524f081dd2 /src | |
parent | 7c925e3e76d239b8cca5a31ddd045aad10190e8a (diff) | |
download | skalibs-828159d33b8ced9e016470c61ffd66bbef048e06.tar.xz |
Something is rotten in the state of FreeBSD... but we all knew it
already. More tentative workarounds.
Diffstat (limited to 'src')
-rw-r--r-- | src/sysdeps/tryancilautoclose.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sysdeps/tryancilautoclose.c b/src/sysdeps/tryancilautoclose.c index c58e3b8..53b768d 100644 --- a/src/sysdeps/tryancilautoclose.c +++ b/src/sysdeps/tryancilautoclose.c @@ -48,7 +48,8 @@ static int ancil_send_fd (int sock, int fd) cmsg->cmsg_level = SOL_SOCKET ; cmsg->cmsg_type = SCM_RIGHTS ; *((int *)CMSG_DATA(cmsg)) = fd ; - return (sendmsg(sock, &msghdr, 0) >= 0) ; + if (sendmsg(sock, &msghdr, 0) < 0) return 0 ; + return 1 ; } static int ancil_recv_fd (int sock) |