From 0bbdf606b698eac5e0d3e71740a0f0cb6aa8b613 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 31 Dec 2020 12:47:50 +0700 Subject: [PATCH] Cygwin doesn't have O_ASYNC, so fix compilation. (#151) It looks like Cygwin doesn't actually support signal-based I/O, so while this compiles, it won't be correct and will need addressing in another way. --- src/inet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inet.c b/src/inet.c index 8d990ad..40b3c2c 100644 --- a/src/inet.c +++ b/src/inet.c @@ -28,8 +28,8 @@ #include #endif /* DOS */ -#ifdef OS5 -/* Solaris doesn't define O_ASYNC, yet still defines FASYNC. */ +#if (defined(OS5) || defined(__CYGWIN__)) && !defined(O_ASYNC) +/* Cygwin and Solaris don't define O_ASYNC, yet still define FASYNC. */ #define O_ASYNC FASYNC #endif