From 828159d33b8ced9e016470c61ffd66bbef048e06 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 20 Dec 2014 23:15:16 +0000 Subject: Something is rotten in the state of FreeBSD... but we all knew it already. More tentative workarounds. --- src/sysdeps/tryancilautoclose.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sysdeps') 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) -- cgit v1.2.3