diff --git a/block/file-posix.c b/block/file-posix.c index 5019ddade9..5998448b1e 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -43,9 +43,11 @@ #include "scsi/constants.h" #include "scsi/utils.h" -#if defined(__APPLE__) && (__MACH__) +#ifndef __sun__ #include -#if defined(HAVE_HOST_BLOCK_DEVICE) +#endif + +#if defined(__APPLE__) && (__MACH__) && defined(HAVE_HOST_BLOCK_DEVICE) #include #include #include @@ -57,7 +59,6 @@ //#include #include #include -#endif /* defined(HAVE_HOST_BLOCK_DEVICE) */ #endif #ifdef __sun__ @@ -65,7 +66,6 @@ #include #endif #ifdef __linux__ -#include #include #include #include @@ -95,27 +95,20 @@ #endif #ifdef __OpenBSD__ -#include #include #include #endif #ifdef __NetBSD__ -#include #include #include #include #endif #ifdef __DragonFly__ -#include #include #endif -#ifdef EMSCRIPTEN -#include -#endif - /* OS X does not have O_DSYNC */ #ifndef O_DSYNC #ifdef O_SYNC