From a23757a317a1809e8e3726ffa7c5bf188258b0d7 Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 5 May 2004 20:01:40 +0000 Subject: [PATCH] bsd compat --- io/io_passfd.c | 4 +++- io/io_receivefd.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/io/io_passfd.c b/io/io_passfd.c index 53d0cf3..6f8168f 100644 --- a/io/io_passfd.c +++ b/io/io_passfd.c @@ -6,7 +6,9 @@ union fdmsg { struct cmsghdr h; - char buf[CMSG_SPACE(sizeof(int))]; + /* on NetBSD, CMSG_SPACE is not constant */ +/* char buf[CMSG_SPACE(sizeof(int))]; */ + char buf[1000]; }; int io_passfd(int64 sock,int64 fd) { diff --git a/io/io_receivefd.c b/io/io_receivefd.c index 0967235..c0be607 100644 --- a/io/io_receivefd.c +++ b/io/io_receivefd.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -6,7 +7,7 @@ union fdmsg { struct cmsghdr h; - char buf[CMSG_SPACE(sizeof(int))]; + char buf[1000]; }; int64 io_receivefd(int64 sock) {