commit 828159d33b8ced9e016470c61ffd66bbef048e06
parent 7c925e3e76d239b8cca5a31ddd045aad10190e8a
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date: Sat, 20 Dec 2014 23:15:16 +0000
Something is rotten in the state of FreeBSD... but we all knew it
already. More tentative workarounds.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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)