void-packages/srcpkgs/open-vm-tools/patches/0003-Do-not-assume-that-linux-and-gnu-libc-are-the-same-t.patch
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

35 lines
1.2 KiB
Diff

#src: https://git.alpinelinux.org/aports/tree/community/open-vm-tools?id=6e0f65e51bfcd02c53bc2b78f46ed18af2dd7ea0
#upstream: no
From 45ddb2ef1fe2e075831aae3ac37d6bde00260826 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/12] 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 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/open-vm-tools/lib/file/fileIOPosix.c b/open-vm-tools/lib/file/fileIOPosix.c
index 23108279..603ea28d 100644
--- a/open-vm-tools/lib/file/fileIOPosix.c
+++ b/open-vm-tools/lib/file/fileIOPosix.c
@@ -198,7 +198,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.
--
2.19.1