aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools/0011-gnu-ucontext.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/open-vm-tools/0011-gnu-ucontext.patch')
-rw-r--r--main/open-vm-tools/0011-gnu-ucontext.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/main/open-vm-tools/0011-gnu-ucontext.patch b/main/open-vm-tools/0011-gnu-ucontext.patch
new file mode 100644
index 0000000000..3f9161a094
--- /dev/null
+++ b/main/open-vm-tools/0011-gnu-ucontext.patch
@@ -0,0 +1,43 @@
+From 2d57a974d9305fac9c18e2f34a04b4d0c204b8fb Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Wed, 18 Nov 2015 10:27:51 +0000
+Subject: [PATCH 11/11] gnu-ucontext
+
+---
+ open-vm-tools/lib/include/sigPosixRegs.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/open-vm-tools/lib/include/sigPosixRegs.h b/open-vm-tools/lib/include/sigPosixRegs.h
+index 08ee2c6..b397260 100644
+--- a/open-vm-tools/lib/include/sigPosixRegs.h
++++ b/open-vm-tools/lib/include/sigPosixRegs.h
+@@ -33,7 +33,7 @@
+ #include "includeCheck.h"
+
+
+-#if __linux__ // We need the REG_foo offsets in the gregset_t;
++#if defined(__GLIBC__) // We need the REG_foo offsets in the gregset_t;
+ # define _GNU_SOURCE // _GNU_SOURCE maps to __USE_GNU
+
+ /* And, the REG_foo definitions conflict with our own in x86.h */
+@@ -73,7 +73,7 @@
+ #include <sys/ucontext.h>
+ #endif
+
+-#if __linux__
++#if defined(__GLIBC__)
+ # if defined(__x86_64__)
+ # undef REG_RAX
+ # undef REG_RBX
+@@ -194,7 +194,7 @@
+ #define SC_ESP(uc) ((unsigned long) (uc)->uc_mcontext.mc_esp)
+ #define SC_EIP(uc) ((unsigned long) (uc)->uc_mcontext.mc_eip)
+ #endif
+-#elif defined (sun)
++#elif !defined (__GLIBC__)
+ #ifdef __x86_64__
+ #define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RAX])
+ #define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RBX])
+--
+2.6.3
+