From 289ca04238678b616a7df96b76c371d62f5e1c28 Mon Sep 17 00:00:00 2001 From: leitner Date: Fri, 1 Jul 2005 19:30:01 +0000 Subject: [PATCH] Work around OpenBSD. Again. --- io/io_passfd.c | 7 +++++++ io/io_receivefd.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/io/io_passfd.c b/io/io_passfd.c index 24c5eb9..50de714 100644 --- a/io/io_passfd.c +++ b/io/io_passfd.c @@ -7,8 +7,15 @@ int io_passfd(int64 sock,int64 fd) { } #else +#ifdef __OpenBSD__ +#warn This is a HORRIBLE kludge around yet another thing OpenBSD broke +#warn If they make it possible to do file descriptor passing with +#warn _XOPEN_SOURCE defined, please send me an email so I can remove this. +#warn _XOPEN_SOURCE needs to be defined for this to work on Solaris. +#else #define _XOPEN_SOURCE #define _XOPEN_SOURCE_EXTENDED 1 +#endif #include #include #include diff --git a/io/io_receivefd.c b/io/io_receivefd.c index 967289f..7c5a544 100644 --- a/io/io_receivefd.c +++ b/io/io_receivefd.c @@ -7,8 +7,15 @@ int64 io_receivefd(int64 sock) { } #else +#ifdef __OpenBSD__ +#warn This is a HORRIBLE kludge around yet another thing OpenBSD broke +#warn If they make it possible to do file descriptor passing with +#warn _XOPEN_SOURCE defined, please send me an email so I can remove this. +#warn _XOPEN_SOURCE needs to be defined for this to work on Solaris. +#else #define _XOPEN_SOURCE #define _XOPEN_SOURCE_EXTENDED 1 +#endif #include #include #include