aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-07-24 09:46:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-07-24 13:59:52 +0000
commit06f984daee0981ccfce8ae0a8b8b663a1c6667f1 (patch)
tree645e47ae4aa142c8c3d25954c4b3982dbfd639b7 /main/open-vm-tools
parentc9f2cd8c8ebf69fd3447aa4ecff56f2c04799ced (diff)
downloadaports-06f984daee0981ccfce8ae0a8b8b663a1c6667f1.tar.bz2
aports-06f984daee0981ccfce8ae0a8b8b663a1c6667f1.tar.xz
main/open-vm-tools: upgrade to 9.4.6 and fix build with musl
Diffstat (limited to 'main/open-vm-tools')
-rw-r--r--main/open-vm-tools/APKBUILD101
-rw-r--r--main/open-vm-tools/codeset-uclibc.patch20
-rw-r--r--main/open-vm-tools/fts.patch21
-rw-r--r--main/open-vm-tools/iconv-uclibc.patch13
-rw-r--r--main/open-vm-tools/libm.patch18
-rw-r--r--main/open-vm-tools/linux-is-not-gnu.patch11
-rw-r--r--main/open-vm-tools/musl-regs.patch95
-rw-r--r--main/open-vm-tools/posix-perms.patch33
-rw-r--r--main/open-vm-tools/setresuid.patch50
-rw-r--r--main/open-vm-tools/struct_timespec.patch27
-rw-r--r--main/open-vm-tools/sys-stat.patch11
-rw-r--r--main/open-vm-tools/tirpc.patch192
-rw-r--r--main/open-vm-tools/uclibc-stubs.patch11
13 files changed, 493 insertions, 110 deletions
diff --git a/main/open-vm-tools/APKBUILD b/main/open-vm-tools/APKBUILD
index 984f5cb251..f3d2701892 100644
--- a/main/open-vm-tools/APKBUILD
+++ b/main/open-vm-tools/APKBUILD
@@ -1,25 +1,32 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=open-vm-tools
-pkgver=9.4.0_p1280544
+pkgver=9.4.6_p1770165
_pkgsubver=${pkgver#*_p}
_ver=${pkgver/_p/-}
pkgrel=0
pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools."
url="http://open-vm-tools.sourceforge.net/"
-arch=""
+arch="all"
license="LGPL"
subpackages="$pkgname-gtk $pkgname-dev"
install="$pkgname.pre-install"
-makedepends="procps-dev libdnet-dev icu-dev glib-dev pkgconfig bash icu-dev automake
- autoconf gtk+-dev libxext-dev libxinerama-dev libxtst-dev gtkmm-dev
- libnotify-dev libxrandr-dev libxcomposite-dev libice-dev libsm-dev fuse-dev libtool m4"
+makedepends="procps-dev libdnet-dev icu-dev glib-dev pkgconfig bash icu-dev
+ gtk+-dev libxext-dev libxinerama-dev libxtst-dev gtkmm-dev fuse-dev
+ libnotify-dev libxrandr-dev libxcomposite-dev libice-dev libsm-dev
+ libtirpc-dev
+ automake autoconf libtool m4
+ "
source="http://downloads.sourceforge.net/project/open-vm-tools/open-vm-tools/stable-${pkgver%.*}.x/open-vm-tools-$_ver.tar.gz
0001-lib-misc-Recognize-Alpine-Linux.patch
- libm.patch
werror.patch
- codeset-uclibc.patch
- iconv-uclibc.patch
- uclibc-stubs.patch
+ tirpc.patch
+ linux-is-not-gnu.patch
+ fts.patch
+ struct_timespec.patch
+ posix-perms.patch
+ setresuid.patch
+ musl-regs.patch
+ sys-stat.patch
open-vm-tools.initd
"
@@ -32,21 +39,6 @@ prepare() {
for patch in $source; do
case $patch in
- # we concider patches with uclibc in its name
- # only usefull on uclibc install
- *uclibc*.patch)
- if [ "$ALPINE_LIBC" != "eglibc" ]; then
- msg "Applying patch $patch"
- patch -p1 -i "$srcdir"/$patch || return 1
- fi
- ;;
- # we do the same for eglibc
- *eglibc*.patch)
- if [ "$ALPINE_LIBC" = "eglibc" ]; then
- msg "Applying patch $patch"
- patch -p1 -i "$srcdir"/$patch || return 1
- fi
- ;;
*.patch)
msg "Applying patch $patch"
patch -p1 -i "$srcdir"/$patch || return 1
@@ -59,24 +51,25 @@ prepare() {
-e 's/__unused3/st_ctim.tv_nsec/g' \
lib/file/filePosix.c lib/hgfsServer/hgfsServerLinux.c \
|| return 1
-
# workaround automake-1.10 issue
- # http://ramblingfoo.blogspot.com/2007/07/required-file-configrpath-not-found.html
+ # http://ramblingfoo.blogspot.com/2007/07/required-file-configrpath-not-
+ mkdir -p config
touch config/config.rpath
- aclocal -I m4 && autoconf && automake
+ libtoolize --force --install && aclocal -I m4 -I config && autoconf \
+ && automake --add-missing
}
build() {
export CUSTOM_PROCPS_NAME="procps"
- export CFLAGS="$CLFAGS -Wno-unused-but-set-variable"
- cd "$_builddir"
- ./configure \
+ export CFLAGS="$CFLAGS -Wno-unused-but-set-variable"
+ mkdir "$srcdir"/build
+ cd "$srcdir"/build
+ ../$pkgname-$_ver/configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
- --disable-unity \
- --with-dnet \
+ --without-dnet \
--with-icu \
--with-procps \
--with-x \
@@ -87,7 +80,7 @@ build() {
}
package() {
- cd "$_builddir"
+ cd "$srcdir"/build
make install DESTDIR=$pkgdir || return 1
install -Dm755 "$srcdir"/open-vm-tools.initd \
"$pkgdir"/etc/init.d/open-vm-tools
@@ -106,27 +99,39 @@ gtk() {
"$subpkgdir"/usr/lib/open-vm-tools/plugins/
}
-md5sums="91f74bf6e42a3f460a42b3be31db31dc open-vm-tools-9.4.0-1280544.tar.gz
+md5sums="3969daf1535d34e1c5f0c87a779b7642 open-vm-tools-9.4.6-1770165.tar.gz
87b131c2208b32d9c0bb6fbacd7f75a9 0001-lib-misc-Recognize-Alpine-Linux.patch
-7d02fc25aba5c248f3d98dac238f175b libm.patch
e462f567cd5588d738af4cfa0dd13b3c werror.patch
-82840b6bed002284b9bd2358707ee826 codeset-uclibc.patch
-89c7449323ddac4666b73a8467baf95a iconv-uclibc.patch
-30a4161baf6274ac9cceb879460cd894 uclibc-stubs.patch
+c89d3f4db3b86bf60359b2c32fc5a22a tirpc.patch
+50a8a12058d4b124b5a7e229993dc365 linux-is-not-gnu.patch
+012907c27e4f5fece18a1e8c21f23776 fts.patch
+821d75876bbb3b55703ec72e02d30cc6 struct_timespec.patch
+2ef8fdedff4998f38c373513cd57fae5 posix-perms.patch
+ad5a1b69aa80d5dfc23f640ac2e33004 setresuid.patch
+8ecff63e2488e3549b1b6d31e476fe8a musl-regs.patch
+22358020ff9d2d917adfc97ad82e176a sys-stat.patch
905ef6a3bac87c9ba2e5d3897ca230e7 open-vm-tools.initd"
-sha256sums="5d30652eb0f6dc5e930781029c184837e700be5543b6a7116db4c62a6f3ca399 open-vm-tools-9.4.0-1280544.tar.gz
+sha256sums="54d7a83d8115124e4b809098b08d7017ba50828801c2f105cdadbc85a064a079 open-vm-tools-9.4.6-1770165.tar.gz
7c12e96fed05834857ff6971d297ac8560eef2942817a37303909b76dff54da0 0001-lib-misc-Recognize-Alpine-Linux.patch
-f73995a63fe82b5a6944c285293dfeafb0f7d2d44998a947591207187cc0be4f libm.patch
b3d39192908c43a26c8aff92d99510b8195c2c7a4e990ff3e74b73ef5bccd73c werror.patch
-adee5e9f929b3a6dbc41c6979d0b6c6569ddc2cc0f6712fdbf1f3fdbaf917723 codeset-uclibc.patch
-70973462f8e10c96d807ae519fc68d819ecc4772f3adc2c3a8a323c19d0e1c2a iconv-uclibc.patch
-ee79dee76f3439fe060b94e41c43e5c9e37806cfc1487f964ec4e719330af68f uclibc-stubs.patch
+1bb6d48d46ea4877e5b2c54eb094f5cf6c3b2fc09db77c01f8fc3626fa13bd6c tirpc.patch
+3caeb8011cc1fa0554b5d96115827a71b273b2031662b2e08376e02633448931 linux-is-not-gnu.patch
+517bef979ea411a0182d18266c2fe1420d1b1940e58e64435af2941f0e44aa45 fts.patch
+87ebc8821291ca7046ec4285c4814cee7ea92bed8c71c9b4c56cbbf19dcb9f9e struct_timespec.patch
+9735e3251e33bb1349af35aa23853a39f660340ca5154488e4dd3594b8b8b53a posix-perms.patch
+8fc78b0d8ca42963be7530bd76d74dd851eea2e0f59661f08810147648702069 setresuid.patch
+13920ca0fbc49646f9294dee6abd3decf072f98b238c8a680e0b98b3f3559c82 musl-regs.patch
+6f738a4a45ee506337a89cfcda05eaeffa38c1f1695d8ee45bf78a00fa1134de sys-stat.patch
7a2ef75375f524042286202b6e03174e60226d4318b4d9145d1fe71517c1af76 open-vm-tools.initd"
-sha512sums="07b36f49713140606f74864b59c2e01c9ed83a960dd3f5d172b84fc75e760f7370065774a0e26897924af60454c86b682ca0fd32276b0e9fb17b268247f8cbdf open-vm-tools-9.4.0-1280544.tar.gz
+sha512sums="a16dc51a51a182031c1849776be9ac0e13bef9d9cb85807e03fbb816d4e9109b64e60f1919f6686a471c79042f30ca93f0193985c2150c6254bc72e3fd8ffa49 open-vm-tools-9.4.6-1770165.tar.gz
c9f99658dcbd659ed7288dae36d47216aeea8a496f7fab52711bffb382fab8035c9414045a1dffae79eb38ff03fcb116e1965dae00532f92a09173695f1756aa 0001-lib-misc-Recognize-Alpine-Linux.patch
-6a93b48f37838ec28a5c1059845235f12df2ea44d256223b8ca4c102297b3ce7e3c6450b860b057df7a9b6b044bfeb23d5f65d5c18adeef03fa838742b556eac libm.patch
2128c4056e110a068a98cbc9c3ef934aa99d2a74ccae6b96aae6776d62595ac1cb544bbc299002bf545827dee0c75a02a227ea5d43838eeae720e70ee7959824 werror.patch
-8b7abbfcf87cc63f9f5acb5479be871365e3dee8ad7b9b3eb64966767c37bcf62f735e9cc1b1a46f39f8901ba658e9fd6090882a9110403f07348b6788247ade codeset-uclibc.patch
-e12c6c7f56b74933ecd6901587be4068f52d3014e8c4af13c919185d13212659f7e01271acf36e84095be163c1917bf35d257ff2c6005a4fc74e4f05e66aba20 iconv-uclibc.patch
-cb8e08576a7c195df9f2a4ebf63a1f5b7047f439e3cc56bc21d03a77298a4f7d11b7bec02d17f5d8d7abf4a2932faad462d7464643169a119d4ba3af891696b0 uclibc-stubs.patch
+98da1733eba6f53a53a9361ee2ad02dbd08fa8958aba449cebbf5be04705af1bc0fab187f2d78b94f2802a3c0b32fa03d33249006236ce27c10702992a62abb4 tirpc.patch
+fa9407febe8ed3bff114eddb66a12e7bfed995a1d8818a7b2fd6c619b6b1f42836326c81a799d6e40250aa5d391b340d7af5aad092409e489e8fdba729e9f132 linux-is-not-gnu.patch
+75d9a72204dbef4e34b8e66c39210a07243abe8663dcf8a194763a15587195e88b47d5882264dd6a8fe0a82c6f94cfb0fa4b02156fca28609ed09a0dd8320bed fts.patch
+7fc08ad7018b6790bb7125621b7e387bfb4219325550ef28a88ddd0b473136afe5da11a8f6066c3ebba6cc645e2f7a16a019cbfca0f31f3164fe505d76517c85 struct_timespec.patch
+ee5e6b49cb3878b37887d95bbaa687536e2339c9ec48a315351ca690f966a800afdc3a7e3026127f59eb8b0549057e9ec299daf3991166bdd66795f79f5ca485 posix-perms.patch
+4cec764234742ea7fa8c61867ae1e396d1fed3d4f881fee063b19ab51ba30b4831d33d8d96a92a03944e7d044c7736d60aa4de06ab5cc8c484fed5cde5c57592 setresuid.patch
+16449ee7b30161d4486385947763b34e02a22429c794333ec641f328b988209fd128f48d9d6c8c41c4e6bb8349df0680cb968ab1212b9cba8bc43d4c36704316 musl-regs.patch
+94d8ce4415b8adce214acc13677e4c93f746923915f9017416f33d05e1c1ea0fad399926d9b5cec3385c97f79266c89a3b4a401d14518b0344398ec77cb44f48 sys-stat.patch
bd0210b74154030bafdf9911d2303e49e1c68afa681e4276577074ac3060b52e8e5f14055b1b088398ce1ef0aee3d63f8d358d9e045a15099391f3713edb922a open-vm-tools.initd"
diff --git a/main/open-vm-tools/codeset-uclibc.patch b/main/open-vm-tools/codeset-uclibc.patch
deleted file mode 100644
index b26df16611..0000000000
--- a/main/open-vm-tools/codeset-uclibc.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./lib/misc/codesetOld.c.orig
-+++ ./lib/misc/codesetOld.c
-@@ -723,7 +723,7 @@
- {
- char *codeset;
-
--#if defined(__linux__)
-+#if defined(__linux__) && !defined(__UCLIBC__)
-
- locale_t new = newlocale(LC_CTYPE_MASK, "", NULL);
- if (!new) {
-@@ -739,7 +739,7 @@
- codeset = Util_SafeStrdup(nl_langinfo_l(CODESET, new));
- freelocale(new);
-
--#elif defined(sun)
-+#elif defined(sun) || defined(__UCLIBC__)
-
- char *locale = setlocale(LC_CTYPE, NULL);
- if (!setlocale(LC_CTYPE, "")) {
diff --git a/main/open-vm-tools/fts.patch b/main/open-vm-tools/fts.patch
new file mode 100644
index 0000000000..e4a5eaf039
--- /dev/null
+++ b/main/open-vm-tools/fts.patch
@@ -0,0 +1,21 @@
+--- open-vm-tools-9.4.6-1770165.orig/configure.ac
++++ open-vm-tools-9.4.6-1770165/configure.ac
+@@ -772,6 +772,7 @@
+ ###
+
+ AC_CHECK_HEADERS([crypt.h])
++AC_CHECK_HEADERS([fts.h])
+ AC_CHECK_HEADERS([inttypes.h])
+ AC_CHECK_HEADERS([stdint.h])
+ AC_CHECK_HEADERS([stdlib.h])
+--- open-vm-tools-9.4.6-1770165.orig/lib/file/filePosix.c
++++ open-vm-tools-9.4.6-1770165/lib/file/filePosix.c
+@@ -99,7 +99,7 @@
+ * happens the prosix version should be updated to use the generic code.
+ */
+
+-#if defined(__USE_FILE_OFFSET64) || defined(sun) || defined(__ANDROID__)
++#if defined(__USE_FILE_OFFSET64) || defined(sun) || defined(__ANDROID__) || !defined(HAVE_FTS_H)
+ # define CAN_USE_FTS 0
+ #else
+ # define CAN_USE_FTS 1
diff --git a/main/open-vm-tools/iconv-uclibc.patch b/main/open-vm-tools/iconv-uclibc.patch
deleted file mode 100644
index 2588125fb8..0000000000
--- a/main/open-vm-tools/iconv-uclibc.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- ./configure.ac
-+++ ./configure.ac
-@@ -1085,6 +1085,9 @@
- AC_DEFINE([NO_MULTIMON], 1, [Define to 1 if building without multimon support.])
- fi
-
-+AM_ICONV
-+LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD $LIBICONV"
-+
- LIB_AUTH_CPPFLAGS="$LIB_AUTH_CPPFLAGS $PAM_CPPFLAGS"
- if test "$HAVE_CRYPT" = "yes"; then
- LIBVMTOOLS_LIBADD="$LIBVMTOOLS_LIBADD -lcrypt"
-
diff --git a/main/open-vm-tools/libm.patch b/main/open-vm-tools/libm.patch
deleted file mode 100644
index cd013f4d20..0000000000
--- a/main/open-vm-tools/libm.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/hgfsmounter/Makefile.am
-+++ b/hgfsmounter/Makefile.am
-@@ -23,6 +23,7 @@
- mount_vmhgfs_LDADD += ../lib/panicDefault/libPanicDefault.la
- mount_vmhgfs_LDADD += ../lib/panic/libPanic.la
- mount_vmhgfs_LDADD += ../lib/stubs/libStubs.la
-+mount_vmhgfs_LDADD += -lm
-
- mount_vmhgfs_SOURCES =
- mount_vmhgfs_SOURCES += hgfsmounter.c
---- a/rpctool/Makefile.am
-+++ b/rpctool/Makefile.am
-@@ -25,4 +25,5 @@
- vmware_rpctool_LDADD += ../lib/message/libMessage.la
- vmware_rpctool_LDADD += ../lib/backdoor/libBackdoor.la
- vmware_rpctool_LDADD += ../lib/string/libString.la
-+vmware_rpctool_LDADD += -lm
-
diff --git a/main/open-vm-tools/linux-is-not-gnu.patch b/main/open-vm-tools/linux-is-not-gnu.patch
new file mode 100644
index 0000000000..3045d536dc
--- /dev/null
+++ b/main/open-vm-tools/linux-is-not-gnu.patch
@@ -0,0 +1,11 @@
+--- open-vm-tools-9.4.6-1770165.orig/lib/include/vm_basic_defs.h
++++ open-vm-tools-9.4.6-1770165/lib/include/vm_basic_defs.h
+@@ -550,7 +550,7 @@
+ #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
diff --git a/main/open-vm-tools/musl-regs.patch b/main/open-vm-tools/musl-regs.patch
new file mode 100644
index 0000000000..9d0236da7c
--- /dev/null
+++ b/main/open-vm-tools/musl-regs.patch
@@ -0,0 +1,95 @@
+--- open-vm-tools-9.4.6-1770165.orig/lib/include/sigPosixRegs.h
++++ open-vm-tools-9.4.6-1770165/lib/include/sigPosixRegs.h
+@@ -37,7 +37,7 @@
+ # define _GNU_SOURCE // _GNU_SOURCE maps to __USE_GNU
+
+ /* And, the REG_foo definitions conflict with our own in x86.h */
+-# if defined(__x86_64__)
++# if defined(__x86_64__) && defined(__GLIBC__)
+ # define REG_RAX GNU_REG_RAX
+ # define REG_RBX GNU_REG_RBX
+ # define REG_RCX GNU_REG_RCX
+@@ -55,7 +55,7 @@
+ # define REG_R13 GNU_REG_R13
+ # define REG_R14 GNU_REG_R14
+ # define REG_R15 GNU_REG_R15
+-# elif defined(__i386__)
++# elif defined(__i386__) && defined(__GLIBC__)
+ # define REG_EAX GNU_REG_EAX
+ # define REG_EBX GNU_REG_EBX
+ # define REG_ECX GNU_REG_ECX
+@@ -73,7 +73,7 @@
+ #include <sys/ucontext.h>
+ #endif
+
+-#if __linux__
++#if __GLIBC__
+ # if defined(__x86_64__)
+ # undef REG_RAX
+ # undef REG_RBX
+@@ -219,23 +219,23 @@
+ #define SC_EIP(uc) ((unsigned long) (uc)->uc_mcontext.eip)
+ #else
+ #ifdef __x86_64__
+-#define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_RAX])
+-#define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_RBX])
+-#define SC_ECX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_RCX])
+-#define SC_EDX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_RDX])
+-#define SC_EDI(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_RDI])
+-#define SC_ESI(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_RSI])
+-#define SC_EBP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_RBP])
+-#define SC_ESP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_RSP])
+-#define SC_EIP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_RIP])
+-#define SC_R8(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_R8])
+-#define SC_R9(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_R9])
+-#define SC_R10(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_R10])
+-#define SC_R11(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_R11])
+-#define SC_R12(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_R12])
+-#define SC_R13(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_R13])
+-#define SC_R14(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_R14])
+-#define SC_R15(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_R15])
++#define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RAX])
++#define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RBX])
++#define SC_ECX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RCX])
++#define SC_EDX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RDX])
++#define SC_EDI(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RDI])
++#define SC_ESI(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RSI])
++#define SC_EBP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RBP])
++#define SC_ESP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RSP])
++#define SC_EIP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_RIP])
++#define SC_R8(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_R8])
++#define SC_R9(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_R9])
++#define SC_R10(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_R10])
++#define SC_R11(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_R11])
++#define SC_R12(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_R12])
++#define SC_R13(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_R13])
++#define SC_R14(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_R14])
++#define SC_R15(uc) ((unsigned long) (uc)->uc_mcontext.gregs[REG_R15])
+ #elif defined(__arm__)
+ #define SC_R0(uc) ((unsigned long) (uc)->uc_mcontext.arm_r0)
+ #define SC_R1(uc) ((unsigned long) (uc)->uc_mcontext.arm_r1)
+@@ -254,15 +254,15 @@
+ #define SC_LR(uc) ((unsigned long) (uc)->uc_mcontext.arm_lr)
+ #define SC_PC(uc) ((unsigned long) (uc)->uc_mcontext.arm_pc)
+ #else
+-#define SC_EAX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EAX])
+-#define SC_EBX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EBX])
+-#define SC_ECX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_ECX])
+-#define SC_EDX(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EDX])
+-#define SC_EDI(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EDI])
+-#define SC_ESI(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_ESI])
+-#define SC_EBP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_EBP])
+-#define SC_ESP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_ESP])
+-#define SC_EIP(uc) ((unsigned long) (uc)->uc_mcontext.gregs[GNU_REG_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
+ #endif
+
diff --git a/main/open-vm-tools/posix-perms.patch b/main/open-vm-tools/posix-perms.patch
new file mode 100644
index 0000000000..ddffb20cbb
--- /dev/null
+++ b/main/open-vm-tools/posix-perms.patch
@@ -0,0 +1,33 @@
+--- open-vm-tools-9.4.6-1770165.orig/lib/hgfsServer/hgfsServerLinux.c
++++ open-vm-tools-9.4.6-1770165/lib/hgfsServer/hgfsServerLinux.c
+@@ -89,8 +89,10 @@
+ * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not defined in the
+ * Solaris version of <sys/stat.h>.
+ */
+-#ifdef sun
++#ifndef ACCESSPERMS
+ # define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
++#endif
++#ifndef ALLPERMS
+ # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
+ #endif
+
+--- open-vm-tools-9.4.6-1770165.orig/services/plugins/dndcp/dnd/dndLinux.c
++++ open-vm-tools-9.4.6-1770165/services/plugins/dndcp/dnd/dndLinux.c
+@@ -51,7 +51,7 @@
+
+ #define DND_ROOTDIR_PERMS (S_IRWXU | S_IRWXG | S_IRWXO)
+ #define DND_STAGINGDIR_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
+-#ifdef sun
++#ifndef ACCESSPERMS
+ #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
+ #endif
+ #ifdef __ANDROID__
+@@ -60,7 +60,6 @@
+ */
+ #define NO_SETMNTENT
+ #define NO_ENDMNTENT
+-#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
+ #endif
+
+
diff --git a/main/open-vm-tools/setresuid.patch b/main/open-vm-tools/setresuid.patch
new file mode 100644
index 0000000000..308d6a78c5
--- /dev/null
+++ b/main/open-vm-tools/setresuid.patch
@@ -0,0 +1,50 @@
+--- open-vm-tools-9.4.6-1770165.orig/configure.ac
++++ open-vm-tools-9.4.6-1770165/configure.ac
+@@ -575,6 +575,7 @@
+
+ AC_CHECK_FUNCS([ecvt])
+ AC_CHECK_FUNCS([fcvt])
++AC_CHECK_FUNCS([setresuid setresgid])
+
+ if test "$os" = "freebsd" -a "$osVersion" -ge 600000; then
+ AC_CHECK_LIB(
+--- open-vm-tools-9.4.6-1770165.orig/lib/procMgr/procMgrPosix.c
++++ open-vm-tools-9.4.6-1770165/lib/procMgr/procMgrPosix.c
+@@ -137,7 +137,7 @@
+ #define BASH_PATH "/bin/bash"
+ #endif
+
+-#if defined(linux) && !defined(GLIBC_VERSION_23) && !defined(__UCLIBC__)
++#if defined(linux)
+ /*
+ * Implements the system calls (they are not wrapped by glibc til 2.3.2).
+ *
+@@ -146,7 +146,7 @@
+ *
+ * (In fact, newer Linux kernels don't even define _syscall macros anymore.)
+ */
+-
++#ifndef HAVE_SETRESUID
+ static INLINE int
+ setresuid(uid_t ruid,
+ uid_t euid,
+@@ -154,8 +154,9 @@
+ {
+ return syscall(__NR_setresuid, ruid, euid, suid);
+ }
++#endif
+
+-
++#ifndef HAVE_SETRESGID
+ static INLINE int
+ setresgid(gid_t ruid,
+ gid_t euid,
+@@ -163,6 +164,8 @@
+ {
+ return syscall(__NR_setresgid, ruid, euid, suid);
+ }
++#endif
++
+ #endif
+
+
diff --git a/main/open-vm-tools/struct_timespec.patch b/main/open-vm-tools/struct_timespec.patch
new file mode 100644
index 0000000000..a2c536794a
--- /dev/null
+++ b/main/open-vm-tools/struct_timespec.patch
@@ -0,0 +1,27 @@
+--- open-vm-tools-9.4.6-1770165.orig/configure.ac
++++ open-vm-tools-9.4.6-1770165/configure.ac
+@@ -837,6 +837,7 @@
+ AC_TYPE_PID_T
+ AC_TYPE_SIZE_T
+ AC_CHECK_MEMBERS([struct stat.st_rdev])
++AC_CHECK_MEMBERS([struct timespec.tv_sec],[],[],[[#include <time.h>]])
+ AC_HEADER_TIME
+ AC_STRUCT_TM
+ AC_C_VOLATILE
+--- open-vm-tools-9.4.6-1770165.orig/lib/include/hgfsUtil.h
++++ open-vm-tools-9.4.6-1770165/lib/include/hgfsUtil.h
+@@ -53,13 +53,7 @@
+ # include <time.h>
+ # endif
+ # include "vm_basic_types.h"
+-# if !defined _STRUCT_TIMESPEC && \
+- !defined _TIMESPEC_DECLARED && \
+- !defined __timespec_defined && \
+- !defined sun && \
+- !defined __FreeBSD__ && \
+- !__APPLE__ && \
+- !defined _WIN32
++# if !defined HAVE_STRUCT_TIMESPEC_TV_SEC
+ struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
diff --git a/main/open-vm-tools/sys-stat.patch b/main/open-vm-tools/sys-stat.patch
new file mode 100644
index 0000000000..14492c7aa8
--- /dev/null
+++ b/main/open-vm-tools/sys-stat.patch
@@ -0,0 +1,11 @@
+--- open-vm-tools-9.4.6-1770165.orig/services/plugins/vix/vixTools.c
++++ open-vm-tools-9.4.6-1770165/services/plugins/vix/vixTools.c
+@@ -54,7 +54,7 @@
+ #include <unistd.h>
+ #endif
+
+-#if defined(sun) || defined(__FreeBSD__) || defined(__APPLE__)
++#ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+ #endif
+
diff --git a/main/open-vm-tools/tirpc.patch b/main/open-vm-tools/tirpc.patch
new file mode 100644
index 0000000000..203c3201cd
--- /dev/null
+++ b/main/open-vm-tools/tirpc.patch
@@ -0,0 +1,192 @@
+--- open-vm-tools-9.4.6-1770165.orig/configure.ac
++++ open-vm-tools-9.4.6-1770165/configure.ac
+@@ -367,6 +367,20 @@
+ AC_MSG_WARN([Fuse is missing, vmblock-fuse will be disabled.])])
+
+ #
++# Check for libtirpc
++#
++AC_VMW_CHECK_LIB([libtirpc],
++ [LIBTIRPC],
++ [libtirpc],
++ [],
++ [],
++ [rpc/xdr.h],
++ [xdr_void],
++ [have_libtirpc=yes],
++ [have_libtitirpc=no;
++ AC_MSG_WARN([libtirpc is missing.])])
++
++#
+ # Check for PAM.
+ #
+ AC_ARG_WITH([pam],
+--- open-vm-tools-9.4.6-1770165.orig/lib/dynxdr/Makefile.am
++++ open-vm-tools-9.4.6-1770165/lib/dynxdr/Makefile.am
+@@ -21,3 +21,9 @@
+ libDynxdr_la_SOURCES += dynxdr.c
+ libDynxdr_la_SOURCES += xdrutil.c
+
++libDynxdr_la_CPPFLAGS =
++libDynxdr_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
++
++libDynxdr_la_LIBADD =
++libDynxdr_la_LIBADD += @LIBTIRPC_LIBS@
++
+--- open-vm-tools-9.4.6-1770165.orig/lib/guestRpc/Makefile.am
++++ open-vm-tools-9.4.6-1770165/lib/guestRpc/Makefile.am
+@@ -20,6 +20,12 @@
+ libGuestRpc_la_SOURCES =
+ libGuestRpc_la_SOURCES += nicinfo_xdr.c
+
++libGuestRpc_la_CPPFLAGS =
++libGuestRpc_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
++
++libGuestRpc_la_LIBADD =
++libGuestRpc_la_LIBADD += @LIBTIRPC_LIBS@
++
+ # XXX: Autoreconf complains about this and recommends using AM_CFLAGS instead.
+ # Problem is, $(CFLAGS) is appended to the compiler command line after AM_CFLAGS
+ # and after libGuestRpc_la_CFLAGS, so "-Wall -Werror" will override this flag.
+--- open-vm-tools-9.4.6-1770165.orig/lib/netUtil/Makefile.am
++++ open-vm-tools-9.4.6-1770165/lib/netUtil/Makefile.am
+@@ -20,3 +20,7 @@
+ libNetUtil_la_SOURCES =
+ libNetUtil_la_SOURCES += netUtilLinux.c
+
++libNetUtil_la_CPPFLAGS =
++libNetUtil_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
++
++libNetUtil_la_LIBADD = @LIBTIRPC_LIBS@
+--- open-vm-tools-9.4.6-1770165.orig/lib/rpcChannel/Makefile.am
++++ open-vm-tools-9.4.6-1770165/lib/rpcChannel/Makefile.am
+@@ -23,3 +23,7 @@
+
+ libRpcChannel_la_CPPFLAGS =
+ libRpcChannel_la_CPPFLAGS += @VMTOOLS_CPPFLAGS@
++libRpcChannel_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
++
++libRpcChannel_la_LIBADD =
++libRpcChannel_la_LIBADD += @LIBTIRPC_LIBS@
+--- open-vm-tools-9.4.6-1770165.orig/libguestlib/Makefile.am
++++ open-vm-tools-9.4.6-1770165/libguestlib/Makefile.am
+@@ -22,11 +22,15 @@
+
+ libguestlib_la_LIBADD =
+ libguestlib_la_LIBADD += @VMTOOLS_LIBS@
++libguestlib_la_LIBADD += @LIBTIRPC_LIBS@
+
+ libguestlib_la_SOURCES =
+ libguestlib_la_SOURCES += guestlibV3_xdr.c
+ libguestlib_la_SOURCES += guestlibIoctl_xdr.c
+ libguestlib_la_SOURCES += vmGuestLib.c
++
++libguestlib_la_CPPFLAGS =
++libguestlib_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+
+ libguestlib_la_LDFLAGS =
+ # We require GCC, so we're fine passing compiler-specific flags.
+--- open-vm-tools-9.4.6-1770165.orig/services/plugins/dndcp/Makefile.am
++++ open-vm-tools-9.4.6-1770165/services/plugins/dndcp/Makefile.am
+@@ -24,6 +24,7 @@
+ libdndcp_la_CPPFLAGS += @GTK_CPPFLAGS@
+ libdndcp_la_CPPFLAGS += @GTKMM_CPPFLAGS@
+ libdndcp_la_CPPFLAGS += @PLUGIN_CPPFLAGS@
++libdndcp_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+ libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/dnd
+ libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/dndGuest
+ libdndcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/stringxx
+@@ -38,6 +39,7 @@
+ libdndcp_la_LIBADD += @GTKMM_LIBS@
+ libdndcp_la_LIBADD += @VMTOOLS_LIBS@
+ libdndcp_la_LIBADD += @HGFS_LIBS@
++libdndcp_la_LIBADD += @LIBTIRPC_LIBS@
+
+ libdndcp_la_SOURCES =
+
+--- open-vm-tools-9.4.6-1770165.orig/services/plugins/guestInfo/getlib/Makefile.am
++++ open-vm-tools-9.4.6-1770165/services/plugins/guestInfo/getlib/Makefile.am
+@@ -25,7 +25,11 @@
+
+ libGuestInfo_la_CPPFLAGS =
+ libGuestInfo_la_CPPFLAGS += @GLIB2_CPPFLAGS@
++libGuestInfo_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+ libGuestInfo_la_CPPFLAGS += -I$(srcdir)/..
++
++libGuestInfo_la_LIBADD =
++libGuestInfo_la_LIBADD += @LIBTIRPC_LIBS@
+
+ AM_CFLAGS = $(DNET_CPPFLAGS)
+
+--- open-vm-tools-9.4.6-1770165.orig/services/plugins/guestInfo/Makefile.am
++++ open-vm-tools-9.4.6-1770165/services/plugins/guestInfo/Makefile.am
+@@ -23,6 +23,7 @@
+
+ libguestInfo_la_CPPFLAGS =
+ libguestInfo_la_CPPFLAGS += @PLUGIN_CPPFLAGS@
++libguestInfo_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+
+ libguestInfo_la_LDFLAGS =
+ libguestInfo_la_LDFLAGS += @PLUGIN_LDFLAGS@
+@@ -31,6 +32,7 @@
+ libguestInfo_la_LIBADD += @VMTOOLS_LIBS@
+ libguestInfo_la_LIBADD += @PROCPS_LIBS@
+ libguestInfo_la_LIBADD += @XDR_LIBS@
++libguestInfo_la_LIBADD += @LIBTIRPC_LIBS@
+ libguestInfo_la_LIBADD += getlib/libGuestInfo.la
+
+ if HAVE_DNET
+--- open-vm-tools-9.4.6-1770165.orig/services/plugins/resolutionSet/Makefile.am
++++ open-vm-tools-9.4.6-1770165/services/plugins/resolutionSet/Makefile.am
+@@ -21,6 +21,7 @@
+ libresolutionSet_la_CPPFLAGS =
+ libresolutionSet_la_CPPFLAGS += @GTK_CPPFLAGS@
+ libresolutionSet_la_CPPFLAGS += @PLUGIN_CPPFLAGS@
++libresolutionSet_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+ libresolutionSet_la_CPPFLAGS += -DRESOLUTION_X11
+
+ libresolutionSet_la_LDFLAGS =
+@@ -30,6 +31,7 @@
+ libresolutionSet_la_LIBADD += @COMMON_XLIBS@
+ libresolutionSet_la_LIBADD += @GTK_LIBS@
+ libresolutionSet_la_LIBADD += @VMTOOLS_LIBS@
++libresolutionSet_la_LIBADD += @LIBTIRPC_LIBS@
+
+ libresolutionSet_la_SOURCES =
+ libresolutionSet_la_SOURCES += libvmwarectrl.c
+--- open-vm-tools-9.4.6-1770165.orig/services/plugins/vix/Makefile.am
++++ open-vm-tools-9.4.6-1770165/services/plugins/vix/Makefile.am
+@@ -20,6 +20,7 @@
+
+ libvix_la_CPPFLAGS =
+ libvix_la_CPPFLAGS += @PLUGIN_CPPFLAGS@
++libvix_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+
+ libvix_la_LDFLAGS =
+ libvix_la_LDFLAGS += @PLUGIN_LDFLAGS@
+@@ -28,6 +29,7 @@
+ libvix_la_LIBADD += @VIX_LIBADD@
+ libvix_la_LIBADD += @VMTOOLS_LIBS@
+ libvix_la_LIBADD += @HGFS_LIBS@
++libvix_la_LIBADD += @LIBTIRPC_LIBS@
+ libvix_la_LIBADD += $(top_builddir)/lib/auth/libAuth.la
+ libvix_la_LIBADD += $(top_builddir)/lib/foundryMsg/libFoundryMsg.la
+ libvix_la_LIBADD += $(top_builddir)/lib/impersonate/libImpersonate.la
+--- open-vm-tools-9.4.6-1770165.orig/services/plugins/vmbackup/Makefile.am
++++ open-vm-tools-9.4.6-1770165/services/plugins/vmbackup/Makefile.am
+@@ -20,6 +20,7 @@
+
+ libvmbackup_la_CPPFLAGS =
+ libvmbackup_la_CPPFLAGS += @PLUGIN_CPPFLAGS@
++libvmbackup_la_CPPFLAGS += @LIBTIRPC_CPPFLAGS@
+
+ libvmbackup_la_LDFLAGS =
+ libvmbackup_la_LDFLAGS += @PLUGIN_LDFLAGS@
+@@ -27,6 +28,7 @@
+ libvmbackup_la_LIBADD =
+ libvmbackup_la_LIBADD += @GOBJECT_LIBS@
+ libvmbackup_la_LIBADD += @VMTOOLS_LIBS@
++libvmbackup_la_LIBADD += @LIBTIRPC_LIBS@
+
+ libvmbackup_la_SOURCES =
+ libvmbackup_la_SOURCES += nullProvider.c
diff --git a/main/open-vm-tools/uclibc-stubs.patch b/main/open-vm-tools/uclibc-stubs.patch
deleted file mode 100644
index 0aeec6c94f..0000000000
--- a/main/open-vm-tools/uclibc-stubs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./lib/stubs/Makefile.am.orig
-+++ ./lib/stubs/Makefile.am
-@@ -32,7 +32,5 @@
- libStubsCS_la_SOURCES += stub-user-msg.c
- libStubsCS_la_SOURCES += stub-user-panic.c
-
--if !LINUX
-- libStubsCS_la_SOURCES += stub-msgfmt-fbsd.c
--endif
-+libStubsCS_la_SOURCES += stub-msgfmt-fbsd.c
-