[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/3] raw-posix: Do not use CONFIG_COCOA macro
From: |
Pavel Borzenkov |
Subject: |
[Qemu-devel] [PATCH 2/3] raw-posix: Do not use CONFIG_COCOA macro |
Date: |
Thu, 10 Nov 2011 22:40:06 +0400 |
Use __APPLE__ and __MACH__ macros instead of CONFIG_COCOA to detect Mac
OS X host. The patch is based on the Ben Leslie's patch:
http://patchwork.ozlabs.org/patch/97859/
Signed-off-by: Pavel Borzenkov <address@hidden>
---
block/raw-posix.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 17e1c6f..ee08f80 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -29,7 +29,7 @@
#include "module.h"
#include "block/raw-posix-aio.h"
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && (__MACH__)
#include <paths.h>
#include <sys/param.h>
#include <IOKit/IOKitLib.h>
@@ -487,7 +487,7 @@ again:
}
if (size == 0)
#endif
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
size = LONG_LONG_MAX;
#else
size = lseek(fd, 0LL, SEEK_END);
@@ -632,7 +632,7 @@ static BlockDriver bdrv_file = {
/***********************************************/
/* host device */
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
static kern_return_t FindEjectableCDMedia( io_iterator_t *mediaIterator );
static kern_return_t GetBSDPath( io_iterator_t mediaIterator, char *bsdPath,
CFIndex maxPathSize );
@@ -710,7 +710,7 @@ static int hdev_open(BlockDriverState *bs, const char
*filename, int flags)
{
BDRVRawState *s = bs->opaque;
-#ifdef CONFIG_COCOA
+#if defined(__APPLE__) && defined(__MACH__)
if (strstart(filename, "/dev/cdrom", NULL)) {
kern_return_t kernResult;
io_iterator_t mediaIterator;
--
1.7.5.4