blob: 9773b4a949882ae8b7c404e6490bb1ee38ce56b1 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From a0983d84185f04c4e40778fe951fde4439894882 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 16 Jul 2017 07:37:03 -0700
4Subject: [PATCH 01/11] Remove assumptions about glibc being only libc
5 implementation on linux
6
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 open-vm-tools/lib/file/fileIOPosix.c | 2 +-
10 open-vm-tools/lib/include/vm_basic_defs.h | 2 ++
11 2 files changed, 3 insertions(+), 1 deletion(-)
12
13Index: open-vm-tools/lib/file/fileIOPosix.c
14===================================================================
15--- open-vm-tools.orig/lib/file/fileIOPosix.c
16+++ open-vm-tools/lib/file/fileIOPosix.c
17@@ -205,7 +205,7 @@ static AlignedPool alignedPool;
18 * are not available in any header file.
19 */
20
21-#if defined(__linux__) && !defined(__ANDROID__)
22+#if defined(__linux__) && defined(__GLIBC__)
23 #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
24 /*
25 * We want preadv/pwritev. But due to FOB=64, the symbols are -64.
26Index: open-vm-tools/lib/include/vm_basic_defs.h
27===================================================================
28--- open-vm-tools.orig/lib/include/vm_basic_defs.h
29+++ open-vm-tools/lib/include/vm_basic_defs.h
30@@ -571,6 +571,7 @@ typedef int pid_t;
31 #if defined __linux__ && !defined __KERNEL__ && !defined MODULE && \
32 !defined VMM && !defined FROBOS && !defined __ANDROID__
33 #include <features.h>
34+#if __GLIBC__
35 #if __GLIBC_PREREQ(2, 1) && !defined GLIBC_VERSION_21
36 #define GLIBC_VERSION_21
37 #endif
38@@ -590,6 +591,7 @@ typedef int pid_t;
39 #define GLIBC_VERSION_212
40 #endif
41 #endif
42+#endif
43
44 /*
45 * Convenience definitions of unicode characters.