]> mj.ucw.cz Git - libucw.git/commitdiff
make Sherlock compilable on Darwin without hacks due to missing direct IO
authorRobert Spalek <robert@ucw.cz>
Thu, 27 Nov 2008 15:51:41 +0000 (07:51 -0800)
committerRobert Spalek <robert@ucw.cz>
Thu, 27 Nov 2008 15:51:41 +0000 (07:51 -0800)
I define O_DIRECT flag to be 0 on Darwin, hence enabling direct IO will
have no effect.  This ignoring will be silent.  A clean solution (with
failure when enabled by the user) would be much more complicated and I just
wanna make Sherlock compilable on Darwin for desktop/debugging usage.

ucw/perl/UCW/Configure/C.pm

index cc42df21c013309b684dcf9ffb3f3bf6f4b5ea9f..026aef6fe76da55c29a2cba62e9ae0117aa9b09f 100644 (file)
@@ -256,6 +256,7 @@ 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
 }
 
 ### Writing C headers with configuration ###