void-packages/srcpkgs/open-vm-tools/patches/1000-strerror_r.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

16 lines
681 B
Diff

#src: https://git.alpinelinux.org/aports/tree/community/open-vm-tools?id=6e0f65e51bfcd02c53bc2b78f46ed18af2dd7ea0
#upstream: no
diff --git a/open-vm-tools/vgauth/common/VGAuthLog.c b/open-vm-tools/vgauth/common/VGAuthLog.c
index fb4261e..1b29536 100644
--- a/open-vm-tools/vgauth/common/VGAuthLog.c
+++ b/open-vm-tools/vgauth/common/VGAuthLog.c
@@ -210,7 +210,7 @@ LogErrorPosixCodeV(int code,
g_vsnprintf(buf, sizeof buf, fmt, args);
buf[sizeof buf - 1] = '\0';
-#ifdef sun
+#if !defined(__GLIBC__)
strerror_r(code, errMsg, sizeof errMsg);
g_warning("[function %s, file %s, line %d], %s, [errno = %d], %s\n",
func, file, line, buf, code, errMsg);