1 diff -pruN '--exclude=*.orig' open-vm-tools-10.1.15~/lib/file/fileLockPrimitive.c open-vm-tools-10.1.15/lib/file/fileLockPrimitive.c
2 --- open-vm-tools-10.1.15~/lib/file/fileLockPrimitive.c 2017-09-29 21:15:57.000000000 +0000
3 +++ open-vm-tools-10.1.15/lib/file/fileLockPrimitive.c 2017-10-03 09:31:21.681628379 +0000
5 #define LOGLEVEL_MODULE main
6 #include "loglevel_user.h"
8 -#define LOCK_SHARED "S"
9 -#define LOCK_EXCLUSIVE "X"
10 +#define __LOCK_SHARED "S"
11 +#define __LOCK_EXCLUSIVE "X"
12 #define FILELOCK_PROGRESS_DEARTH 8000 // Dearth of progress time in milliseconds
13 #define FILELOCK_PROGRESS_SAMPLE 200 // Progress sampling time in milliseconds
15 @@ -472,8 +472,8 @@ fixedUp:
19 - if ((strcmp(argv[3], LOCK_SHARED) != 0) &&
20 - (strcmp(argv[3], LOCK_EXCLUSIVE) != 0)) {
21 + if ((strcmp(argv[3], __LOCK_SHARED) != 0) &&
22 + (strcmp(argv[3], __LOCK_EXCLUSIVE) != 0)) {
26 @@ -1096,8 +1096,8 @@ FileLockWaitForPossession(const char *lo
27 ((memberValues->lamportNumber == myValues->lamportNumber) &&
28 (Unicode_Compare(memberValues->memberName,
29 myValues->memberName) < 0))) &&
30 - ((strcmp(memberValues->lockType, LOCK_EXCLUSIVE) == 0) ||
31 - (strcmp(myValues->lockType, LOCK_EXCLUSIVE) == 0))) {
32 + ((strcmp(memberValues->lockType, __LOCK_EXCLUSIVE) == 0) ||
33 + (strcmp(myValues->lockType, __LOCK_EXCLUSIVE) == 0))) {
37 @@ -1675,7 +1675,7 @@ FileLockIntrinsicPortable(const char *pa
40 Warning(LGPFX" %s implicit %s lock succeeded on '%s'.\n",
41 - __FUNCTION__, LOCK_SHARED, pathName);
42 + __FUNCTION__, __LOCK_SHARED, pathName);
45 memberFilePath = &implicitReadToken;
46 @@ -1838,7 +1838,7 @@ FileLockIntrinsic(const char *pathName,
47 /* Construct the locking directory path */
48 lockBase = Unicode_Append(pathName, FILELOCK_SUFFIX);
50 - myValues.lockType = exclusivity ? LOCK_EXCLUSIVE : LOCK_SHARED;
51 + myValues.lockType = exclusivity ? __LOCK_EXCLUSIVE : __LOCK_SHARED;
52 myValues.exclusivity = exclusivity;
53 myValues.waitTime = 0;
54 myValues.msecMaxWaitTime = msecMaxWaitTime;