]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
fix tools build with FileIOAligned_Malloc
authorVMware, Inc <>
Tue, 29 Mar 2011 20:00:38 +0000 (13:00 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Tue, 29 Mar 2011 20:00:38 +0000 (13:00 -0700)
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/file/fileIOPosix.c
open-vm-tools/lib/file/fileInt.h

index 96e415ee9a7ba24b4e9c0adcb1614360f95b931f..7461169d447fadf65e99d2909d8b56ca5966cc1c 100644 (file)
@@ -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)
 
 /*
  *---------------------------------------------------------------------------
index 2e8729c4ef02cfb01645c25455f434b6399313a0..f494351f5de4c37e5b8ace6b958a36b2fa53c2c4 100644 (file)
@@ -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