From 0ac64e9aab025ca3935ccf90d5a9aa1a13d1d06e Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Fri, 28 Nov 2008 14:13:24 +0100 Subject: [PATCH] Fail when O_DIRECT requested on Darwin Darwin does not support direct IO. --- ucw/perl/UCW/Configure/C.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucw/perl/UCW/Configure/C.pm b/ucw/perl/UCW/Configure/C.pm index 026aef6f..4e3fbf90 100644 --- a/ucw/perl/UCW/Configure/C.pm +++ b/ucw/perl/UCW/Configure/C.pm @@ -256,7 +256,11 @@ if (IsSet("CONFIG_DARWIN")) { Append("COPT" => "-I/sw/include"); # Fill in some constants not found in the system header files Set("SOL_TCP" => 6); # missing in /usr/include/netinet/tcp.h - Set("O_DIRECT" => 0); # Darwin doesn't support direct IO, so make Sherlock at least compilable + if(IsGiven("O_DIRECT") && IsSet("O_DIRECT") && (Get("O_DIRECT") != 0)) + { + Fail("Darwin does not support direct IO"); + } + Set("O_DIRECT" => 0); } ### Writing C headers with configuration ### -- 2.39.2