From: VMware, Inc <> Date: Tue, 29 Mar 2011 20:00:38 +0000 (-0700) Subject: fix tools build with FileIOAligned_Malloc X-Git-Tag: 2011.03.28-387002~60 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ea8e38aef331ccb1cd14fecd2c6a2f3c8c7378c;p=thirdparty%2Fopen-vm-tools.git fix tools build with FileIOAligned_Malloc Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/file/fileIOPosix.c b/open-vm-tools/lib/file/fileIOPosix.c index 96e415ee9..7461169d4 100644 --- a/open-vm-tools/lib/file/fileIOPosix.c +++ b/open-vm-tools/lib/file/fileIOPosix.c @@ -154,7 +154,7 @@ static FilePosixOptions filePosixOptions; * Data structures for FileIOAligned_* functions; only used on * hosted (see fileInt.h for rationale). */ -#ifndef VMX86_SERVER +#if !defined(VMX86_TOOLS) && !defined(VMX86_SERVER) #define ALIGNEDPOOL_FREELIST_SIZE 30 #define ALIGNEDPOOL_BUFSZ (1024 * 1024) #define ALIGNEDPOOL_OLD_AGE ((VmTimeType)1000 * 1000 * 1000) /* nanoseconds */ @@ -2416,7 +2416,7 @@ FileIO_SupportsPrealloc(const char *pathName, // IN: * The FileIOAligned_* functions are only used on * hosted (see fileInt.h for rationale). */ -#ifndef VMX86_SERVER +#if !defined(VMX86_TOOLS) && !defined(VMX86_SERVER) /* *--------------------------------------------------------------------------- diff --git a/open-vm-tools/lib/file/fileInt.h b/open-vm-tools/lib/file/fileInt.h index 2e8729c4e..f494351f5 100644 --- a/open-vm-tools/lib/file/fileInt.h +++ b/open-vm-tools/lib/file/fileInt.h @@ -278,9 +278,12 @@ EXTERN Bool FileIsWritableDir(ConstUnicode dirName); * 2. we don't want to do extra large allocations * 3. we don't have the same alignment constraints * so simply define it away to nothing. + * + * Tools is another case, we can use this path for IO but we don't want to add + * MXUserExclLock dependencies. */ -#ifdef VMX86_SERVER +#if defined(VMX86_TOOLS) || defined(VMX86_SERVER) #define FileIOAligned_PoolInit() /* nothing */ #define FileIOAligned_PoolExit() /* nothing */ #define FileIOAligned_PoolMalloc(sz) NULL