aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools/0003-Do-not-assume-that-linux-and-gnu-libc-are-the-same-t.patch
blob: 55ee28a6bcaeea98e8600fb152f8a026762b9130 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 7be57bd68c323840119a3366fea297d6c81cc32c Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 17 Nov 2015 10:39:01 +0000
Subject: [PATCH 03/11] Do not assume that linux and gnu libc are the same
 thing

Use __GLIBC__ when testing for GNU libc specific things instead of
assuming that __linux__ is GNU libc.

This is needed for building with musl libc.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
 open-vm-tools/lib/file/fileIOPosix.c      | 2 +-
 open-vm-tools/lib/include/vm_basic_defs.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/open-vm-tools/lib/file/fileIOPosix.c b/open-vm-tools/lib/file/fileIOPosix.c
index 18aa641..8f19239 100644
--- a/open-vm-tools/lib/file/fileIOPosix.c
+++ b/open-vm-tools/lib/file/fileIOPosix.c
@@ -205,7 +205,7 @@ static AlignedPool alignedPool;
  * are not available in any header file.
  */
 
-#if defined(__linux__) && !defined(__ANDROID__)
+#if defined(__linux__) && defined(__GLIBC__)
    #if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
       /*
        * We want preadv/pwritev. But due to FOB=64, the symbols are -64.
diff --git a/open-vm-tools/lib/include/vm_basic_defs.h b/open-vm-tools/lib/include/vm_basic_defs.h
index 81c5e21..b70cd05 100644
--- a/open-vm-tools/lib/include/vm_basic_defs.h
+++ b/open-vm-tools/lib/include/vm_basic_defs.h
@@ -552,7 +552,7 @@ typedef int pid_t;
 #endif
 #endif
 
-#if defined __linux__ && !defined __KERNEL__ && !defined MODULE && \
+#if defined __GLIBC__ && !defined __KERNEL__ && !defined MODULE && \
                          !defined VMM && !defined FROBOS && !defined __ANDROID__
 #include <features.h>
 #if __GLIBC_PREREQ(2, 1) && !defined GLIBC_VERSION_21
-- 
2.6.3