diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-23 14:12:07 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-23 14:41:42 +0000 |
commit | a28895f56f2ab9233f7ad1b345e07c6249bef1f3 (patch) | |
tree | 84d5692bfd48a1c91da1bb1113078093be582b3f /community/open-vm-tools/0009-gnu-ucontext.patch | |
parent | 00fc18aa0c07998215c7fc55185c63ae496592eb (diff) | |
download | aports-a28895f56f2ab9233f7ad1b345e07c6249bef1f3.tar.bz2 aports-a28895f56f2ab9233f7ad1b345e07c6249bef1f3.tar.xz |
community/open-vm-tools: move from main
Diffstat (limited to 'community/open-vm-tools/0009-gnu-ucontext.patch')
-rw-r--r-- | community/open-vm-tools/0009-gnu-ucontext.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/community/open-vm-tools/0009-gnu-ucontext.patch b/community/open-vm-tools/0009-gnu-ucontext.patch new file mode 100644 index 0000000000..77c4f8e158 --- /dev/null +++ b/community/open-vm-tools/0009-gnu-ucontext.patch @@ -0,0 +1,68 @@ +From 33835208753a350a71a130837ad9e2289fd4cf2c Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Wed, 18 Nov 2015 10:27:51 +0000 +Subject: [PATCH 09/12] gnu-ucontext + +--- + open-vm-tools/lib/include/sigPosixRegs.h | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/open-vm-tools/lib/include/sigPosixRegs.h b/open-vm-tools/lib/include/sigPosixRegs.h +index ee36da59..88d327a7 100644 +--- a/open-vm-tools/lib/include/sigPosixRegs.h ++++ b/open-vm-tools/lib/include/sigPosixRegs.h +@@ -36,7 +36,7 @@ + extern "C" { + #endif + +-#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 */ +@@ -74,7 +74,7 @@ extern "C" { + #include <signal.h> + #include <sys/ucontext.h> + +-#if __linux__ && !defined __ANDROID__ ++#if defined(__GLIBC__) + # if defined(__x86_64__) + # undef REG_RAX + # undef REG_RBX +@@ -200,7 +200,7 @@ extern "C" { + #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]) +@@ -220,15 +220,15 @@ extern "C" { + #define SC_R14(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_R14]) + #define SC_R15(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_R15]) + #else +-#define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[EAX]) +-#define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[EBX]) +-#define SC_ECX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[ECX]) +-#define SC_EDX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[EDX]) +-#define SC_EDI(uc) ((unsigned long) (uc)->uc_mcontext.gregs[EDI]) +-#define SC_ESI(uc) ((unsigned long) (uc)->uc_mcontext.gregs[ESI]) +-#define SC_EBP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[EBP]) +-#define SC_ESP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[ESP]) +-#define SC_EIP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[EIP]) ++#define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_EAX]) ++#define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_EBX]) ++#define SC_ECX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_ECX]) ++#define SC_EDX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_EDX]) ++#define SC_EDI(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_EDI]) ++#define SC_ESI(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_ESI]) ++#define SC_EBP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_EBP]) ++#define SC_ESP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_ESP]) ++#define SC_EIP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_EIP]) + #endif + #elif defined(ANDROID_X86) + #define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_EAX]) +-- +2.19.1 + |