summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch94
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch78
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-configure.ac-don-t-use-dnet-config.patch16
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-hgfsmounter-Makefile.am-support-usrmerge.patch33
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-utilBacktrace-Ignore-Warray-bounds.patch33
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-Rename-poll.h-to-vm_poll.h.patch115
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-add-include-sys-sysmacros.h.patch17
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch41
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0003-Use-configure-test-for-struct-timespec.patch (renamed from external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-test-for-struct-timespec.patch)22
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch (renamed from external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0006-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch)26
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch (renamed from external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0007-Use-configure-to-test-for-feature-instead-of-platfor.patch)38
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0006-Use-configure-test-for-sys-stat.h-include.patch (renamed from external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0011-Use-configure-test-for-sys-stat.h-include.patch)12
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0007-Fix-subdir-objects-configure-error.patch24
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0008-include-poll.h-instead-of-sys-poll.h.patch (renamed from external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-include-poll.h-instead-of-sys-poll.h.patch)10
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch742
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0010-use-posix-strerror_r-unless-on-gnu-libc-system.patch (renamed from external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0003-use-posix-strerror_r-unless-on-gnu-libc-system.patch)8
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0011-Use-uintmax_t-for-handling-rlim_t.patch (renamed from external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Use-uintmax_t-for-handling-rlim_t.patch)10
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0012-Use-off64_t-instead-of-__off64_t.patch (renamed from external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Use-off64_t-instead-of-__off64_t.patch)10
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0013-misc-Do-not-print-NULL-string-into-logs.patch27
-rw-r--r--external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/fix-subdir-objects-configure-error.patch12
20 files changed, 1154 insertions, 214 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch
new file mode 100644
index 00000000..6cb5dfcc
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-GitHub-Issue-367.-Remove-references-to-deprecated-G_.patch
@@ -0,0 +1,94 @@
+From 6fb28085e867d7c3ef46577d9ff193a185693bcb Mon Sep 17 00:00:00 2001
+From: Oliver Kurth <okurth@vmware.com>
+Date: Mon, 30 Sep 2019 16:24:27 -0700
+Subject: [PATCH] GitHub Issue #367. Remove references to deprecated G_INLINE_FUNC.
+
+G_INLINE_FUNC was a work-around for compilers that didn't support
+static inline. Change uses of it to static inline.
+
+Upstream-Status: Backport
+[https://github.com/vmware/open-vm-tools/commit/89c0d444567eb525e8d083fb564c46d68e96660c]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ open-vm-tools/lib/include/vmware/tools/plugin.h | 2 +-
+ open-vm-tools/lib/include/vmware/tools/threadPool.h | 8 ++++----
+ open-vm-tools/lib/include/vmware/tools/utils.h | 9 ---------
+ 3 files changed, 5 insertions(+), 14 deletions(-)
+
+diff --git a/open-vm-tools/lib/include/vmware/tools/plugin.h b/open-vm-tools/lib/include/vmware/tools/plugin.h
+index f9acc6a2..deefd1f3 100644
+--- a/open-vm-tools/lib/include/vmware/tools/plugin.h
++++ b/open-vm-tools/lib/include/vmware/tools/plugin.h
+@@ -290,7 +290,7 @@ typedef struct ToolsAppCtx {
+ *
+ * @return TRUE if COM is initialized when the function returns.
+ */
+-G_INLINE_FUNC gboolean
++static inline gboolean
+ ToolsCore_InitializeCOM(ToolsAppCtx *ctx)
+ {
+ if (!ctx->comInitialized) {
+diff --git a/open-vm-tools/lib/include/vmware/tools/threadPool.h b/open-vm-tools/lib/include/vmware/tools/threadPool.h
+index 3f2082b3..5880fbcf 100644
+--- a/open-vm-tools/lib/include/vmware/tools/threadPool.h
++++ b/open-vm-tools/lib/include/vmware/tools/threadPool.h
+@@ -91,7 +91,7 @@ typedef struct ToolsCorePool {
+ *******************************************************************************
+ */
+
+-G_INLINE_FUNC ToolsCorePool *
++static inline ToolsCorePool *
+ ToolsCorePool_GetPool(ToolsAppCtx *ctx)
+ {
+ ToolsCorePool *pool = NULL;
+@@ -123,7 +123,7 @@ ToolsCorePool_GetPool(ToolsAppCtx *ctx)
+ *******************************************************************************
+ */
+
+-G_INLINE_FUNC guint
++static inline guint
+ ToolsCorePool_SubmitTask(ToolsAppCtx *ctx,
+ ToolsCorePoolCb cb,
+ gpointer data,
+@@ -153,7 +153,7 @@ ToolsCorePool_SubmitTask(ToolsAppCtx *ctx,
+ *******************************************************************************
+ */
+
+-G_INLINE_FUNC void
++static inline void
+ ToolsCorePool_CancelTask(ToolsAppCtx *ctx,
+ guint taskId)
+ {
+@@ -197,7 +197,7 @@ ToolsCorePool_CancelTask(ToolsAppCtx *ctx,
+ *******************************************************************************
+ */
+
+-G_INLINE_FUNC gboolean
++static inline gboolean
+ ToolsCorePool_StartThread(ToolsAppCtx *ctx,
+ const gchar *threadName,
+ ToolsCorePoolCb cb,
+diff --git a/open-vm-tools/lib/include/vmware/tools/utils.h b/open-vm-tools/lib/include/vmware/tools/utils.h
+index f6574590..a3292d5c 100644
+--- a/open-vm-tools/lib/include/vmware/tools/utils.h
++++ b/open-vm-tools/lib/include/vmware/tools/utils.h
+@@ -51,15 +51,6 @@
+ # include <sys/time.h>
+ #endif
+
+-
+-/* Work around a glib limitation: it doesn't set G_INLINE_FUNC on Win32. */
+-#if defined(G_PLATFORM_WIN32)
+-# if defined(G_INLINE_FUNC)
+-# undef G_INLINE_FUNC
+-# endif
+-# define G_INLINE_FUNC static __inline
+-#endif
+-
+ #ifndef ABS
+ # define ABS(x) (((x) >= 0) ? (x) : -(x))
+ #endif
+--
+2.23.0
+
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch
new file mode 100644
index 00000000..61a681f1
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Make-HgfsConvertFromNtTimeNsec-aware-of-64-bit-time_.patch
@@ -0,0 +1,78 @@
+From caf80e220b055dbce259078be96e899dc78ec1d2 Mon Sep 17 00:00:00 2001
+From: Bartosz Brachaczek <b.brachaczek@gmail.com>
+Date: Tue, 12 Nov 2019 14:31:08 +0100
+Subject: [PATCH] Make HgfsConvertFromNtTimeNsec aware of 64-bit time_t on i386
+
+I verified that this function behaves as expected on x86_64, i386 with
+32-bit time_t, and i386 with 64-bit time_t for the following values of
+ntTtime:
+
+UNIX_EPOCH-1, UNIX_EPOCH, UNIX_EPOCH+1, UNIX_S32_MAX-1, UNIX_S32_MAX,
+UNIX_S32_MAX+1, UNIX_S32_MAX*2+1
+
+I did not verify whether the use of Div643264 is optimal, performance
+wise.
+
+Upstream-Status: Submitted [https://github.com/vmware/open-vm-tools/pull/387]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ open-vm-tools/lib/hgfs/hgfsUtil.c | 34 +++++++++++++++++--------------
+ 1 file changed, 19 insertions(+), 15 deletions(-)
+
+diff --git a/open-vm-tools/lib/hgfs/hgfsUtil.c b/open-vm-tools/lib/hgfs/hgfsUtil.c
+index cc580ab8..49b10040 100644
+--- a/open-vm-tools/lib/hgfs/hgfsUtil.c
++++ b/open-vm-tools/lib/hgfs/hgfsUtil.c
+@@ -110,23 +110,21 @@ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
+ uint64 ntTime) // IN: Time in Windows NT format
+ {
+ #ifdef __i386__
+- uint32 sec;
+- uint32 nsec;
++ uint64 sec64;
++ uint32 sec32, nsec;
++#endif
+
+ ASSERT(unixTime);
+- /* We assume that time_t is 32bit */
+- ASSERT_ON_COMPILE(sizeof (unixTime->tv_sec) == 4);
+
+- /* Cap NT time values that are outside of Unix time's range */
++ if (sizeof (unixTime->tv_sec) == 4) {
++ /* Cap NT time values that are outside of Unix time's range */
+
+- if (ntTime >= UNIX_S32_MAX) {
+- unixTime->tv_sec = 0x7FFFFFFF;
+- unixTime->tv_nsec = 0;
+- return 1;
++ if (ntTime >= UNIX_S32_MAX) {
++ unixTime->tv_sec = 0x7FFFFFFF;
++ unixTime->tv_nsec = 0;
++ return 1;
++ }
+ }
+-#else
+- ASSERT(unixTime);
+-#endif
+
+ if (ntTime < UNIX_EPOCH) {
+ unixTime->tv_sec = 0;
+@@ -135,9 +133,15 @@ HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
+ }
+
+ #ifdef __i386__
+- Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec);
+- unixTime->tv_sec = sec;
+- unixTime->tv_nsec = nsec * 100;
++ if (sizeof (unixTime->tv_sec) == 4) {
++ Div643232(ntTime - UNIX_EPOCH, 10000000, &sec32, &nsec);
++ unixTime->tv_sec = sec32;
++ unixTime->tv_nsec = nsec * 100;
++ } else {
++ Div643264(ntTime - UNIX_EPOCH, 10000000, &sec64, &nsec);
++ unixTime->tv_sec = sec64;
++ unixTime->tv_nsec = nsec * 100;
++ }
+ #else
+ unixTime->tv_sec = (ntTime - UNIX_EPOCH) / 10000000;
+ unixTime->tv_nsec = ((ntTime - UNIX_EPOCH) % 10000000) * 100;
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-configure.ac-don-t-use-dnet-config.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-configure.ac-don-t-use-dnet-config.patch
index b7a40583..a711f5e5 100644
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-configure.ac-don-t-use-dnet-config.patch
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-configure.ac-don-t-use-dnet-config.patch
@@ -1,4 +1,4 @@
-From 929150608c16644695f19cd2e0cc8a06a41cd497 Mon Sep 17 00:00:00 2001
+From fc9bf1ce9f1a21150b10736a1c968d4ca6d4eaa3 Mon Sep 17 00:00:00 2001
From: Martin Kelly <mkelly@xevo.com>
Date: Fri, 7 Apr 2017 15:20:30 -0700
Subject: [PATCH] configure.ac: don't use dnet-config
@@ -11,14 +11,12 @@ Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Martin Kelly <mkelly@xevo.com>
---
- configure.ac | 4 ++--
+ open-vm-tools/configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-Index: open-vm-tools/configure.ac
-===================================================================
---- open-vm-tools.orig/configure.ac
-+++ open-vm-tools/configure.ac
-@@ -944,7 +944,7 @@ if test "$with_dnet" = "yes"; then
+--- a/open-vm-tools/configure.ac
++++ b/open-vm-tools/configure.ac
+@@ -937,7 +937,7 @@ if test "$with_dnet" = "yes"; then
AC_VMW_CHECK_LIB([dnet],
[DNET],
[],
@@ -27,11 +25,11 @@ Index: open-vm-tools/configure.ac
[],
[dnet.h],
[intf_open],
-@@ -954,7 +954,7 @@ if test "$with_dnet" = "yes"; then
+@@ -947,7 +947,7 @@ if test "$with_dnet" = "yes"; then
if test $have_dnet = "no"; then
AC_MSG_ERROR(
-- [dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net])
+- [dnet-config was not found on your PATH. Please configure without dnet or install dnet - http://libdnet.sourceforge.net])
+ [dnet was not found. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net])
fi
fi
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-hgfsmounter-Makefile.am-support-usrmerge.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-hgfsmounter-Makefile.am-support-usrmerge.patch
new file mode 100644
index 00000000..82443ee6
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-hgfsmounter-Makefile.am-support-usrmerge.patch
@@ -0,0 +1,33 @@
+From 33798f3e484ebd3470e9da791b73b4b90ba12bc3 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Tue, 14 Jan 2020 15:04:03 +0800
+Subject: [PATCH] hgfsmounter/Makefile.am: support usrmerge
+
+There is a do_package error when enable usrmerge feature due to the
+hardcoded sbin directory. Remove this piece of code because we already
+create the symbolic link in do_install.
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ open-vm-tools/hgfsmounter/Makefile.am | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/open-vm-tools/hgfsmounter/Makefile.am b/open-vm-tools/hgfsmounter/Makefile.am
+index 7c1ba1a..58bd3f8 100644
+--- a/open-vm-tools/hgfsmounter/Makefile.am
++++ b/open-vm-tools/hgfsmounter/Makefile.am
+@@ -39,9 +39,6 @@ uninstall-hook:
+ rm -f $(DESTDIR)$(sbindir)/mount_vmhgfs
+ else
+ install-exec-hook:
+- -$(MKDIR_P) $(DESTDIR)/sbin
+- -$(LN_S) $(DESTDIR)$(sbindir)/mount.vmhgfs \
+- $(DESTDIR)/sbin/mount.vmhgfs &> /dev/null
+ uninstall-hook:
+ rm -f $(DESTDIR)/sbin/mount.vmhgfs
+ endif !FREEBSD
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-utilBacktrace-Ignore-Warray-bounds.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-utilBacktrace-Ignore-Warray-bounds.patch
new file mode 100644
index 00000000..95664e85
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-utilBacktrace-Ignore-Warray-bounds.patch
@@ -0,0 +1,33 @@
+From ac3f93ea087d3a5461fe57fe021d0fe9a959e13c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 25 Dec 2019 15:25:02 -0800
+Subject: [PATCH] utilBacktrace: Ignore -Warray-bounds
+
+This is new warning with gcc10, until its fixed ignore it like gcc<10
+did
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ open-vm-tools/lib/user/utilBacktrace.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/open-vm-tools/lib/user/utilBacktrace.c b/open-vm-tools/lib/user/utilBacktrace.c
+index b72340ad..97ca53f2 100644
+--- a/open-vm-tools/lib/user/utilBacktrace.c
++++ b/open-vm-tools/lib/user/utilBacktrace.c
+@@ -517,6 +517,11 @@ Util_BacktraceWithFunc(int bugNr, // IN:
+ } else {
+ outFunc(outFuncData, "Backtrace for bugNr=%d\n",bugNr);
+ }
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Warray-bounds"
++
+ Util_BacktraceFromPointerWithFunc(&x[-2], outFunc, outFuncData);
++#pragma GCC diagnostic pop
+ #endif
+ }
++
+--
+2.24.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-Rename-poll.h-to-vm_poll.h.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-Rename-poll.h-to-vm_poll.h.patch
deleted file mode 100644
index 4d6a0fd6..00000000
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-Rename-poll.h-to-vm_poll.h.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 92955b3a6180b4285d11ef79766df01b9ab60dbd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Jun 2018 23:11:58 -0700
-Subject: [PATCH] Rename poll.h to vm_poll.h
-
-musl libc's system headers pulls in open-vm-tools' poll.h. To avoid this
-we rename poll.h to vm_poll.h.
-
-Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- open-vm-tools/lib/asyncsocket/asyncsocket.c | 2 +-
- open-vm-tools/lib/hgfsServer/hgfsServer.c | 2 +-
- open-vm-tools/lib/include/asyncsocket.h | 2 +-
- open-vm-tools/lib/include/pollImpl.h | 2 +-
- open-vm-tools/lib/include/{poll.h => vm_poll.h} | 2 +-
- open-vm-tools/lib/rpcIn/rpcin.c | 2 +-
- .../services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c | 2 +-
- 7 files changed, 7 insertions(+), 7 deletions(-)
- rename open-vm-tools/lib/include/{poll.h => vm_poll.h} (99%)
-
-diff --git a/lib/asyncsocket/asyncsocket.c b/lib/asyncsocket/asyncsocket.c
-index e0a68e7e..b9675674 100644
---- a/lib/asyncsocket/asyncsocket.c
-+++ b/lib/asyncsocket/asyncsocket.c
-@@ -86,7 +86,7 @@
- #include "random.h"
- #include "asyncsocket.h"
- #include "asyncSocketBase.h"
--#include "poll.h"
-+#include "vm_poll.h"
- #include "log.h"
- #include "err.h"
- #include "hostinfo.h"
-diff --git a/lib/hgfsServer/hgfsServer.c b/lib/hgfsServer/hgfsServer.c
-index 991a7941..ed0c09f9 100644
---- a/lib/hgfsServer/hgfsServer.c
-+++ b/lib/hgfsServer/hgfsServer.c
-@@ -48,7 +48,7 @@
- #include "hgfsServerOplock.h"
- #include "hgfsDirNotify.h"
- #include "userlock.h"
--#include "poll.h"
-+#include "vm_poll.h"
- #include "mutexRankLib.h"
- #include "vm_basic_asm.h"
- #include "unicodeOperations.h"
-diff --git a/lib/include/asyncsocket.h b/lib/include/asyncsocket.h
-index 524147ea..103f944f 100644
---- a/lib/include/asyncsocket.h
-+++ b/lib/include/asyncsocket.h
-@@ -164,7 +164,7 @@ typedef struct AsyncSocket AsyncSocket;
- * Or the client can specify its favorite poll class and locking behavior.
- * Use of IVmdbPoll is only supported for regular sockets and for Attach.
- */
--#include "poll.h"
-+#include "vm_poll.h"
- struct IVmdbPoll;
- typedef struct AsyncSocketPollParams {
- int flags; /* Default 0, only POLL_FLAG_NO_BULL is valid */
-diff --git a/lib/include/pollImpl.h b/lib/include/pollImpl.h
-index 46442e55..8bc66997 100644
---- a/lib/include/pollImpl.h
-+++ b/lib/include/pollImpl.h
-@@ -44,7 +44,7 @@
- #define INCLUDE_ALLOW_USERLEVEL
- #include "includeCheck.h"
-
--#include "poll.h"
-+#include "vm_poll.h"
- #include "vm_basic_asm.h"
-
- #if defined(__cplusplus)
-diff --git a/lib/include/poll.h b/lib/include/vm_poll.h
-similarity index 99%
-rename from open-vm-tools/lib/include/poll.h
-rename to open-vm-tools/lib/include/vm_poll.h
-index 988fe6d0..e9e74fb5 100644
---- a/lib/include/poll.h
-+++ b/lib/include/vm_poll.h
-@@ -60,7 +60,7 @@ extern "C" {
- #if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0
- #include <sys/kernel.h>
- #endif
--#include <sys/poll.h>
-+#include <poll.h>
- #define HZ 100
- #endif
- #ifdef __ANDROID__
-diff --git a/lib/rpcIn/rpcin.c b/lib/rpcIn/rpcin.c
-index c2c51583..d6c62f10 100644
---- a/lib/rpcIn/rpcin.c
-+++ b/lib/rpcIn/rpcin.c
-@@ -57,7 +57,7 @@
-
- #if defined(VMTOOLS_USE_VSOCKET)
- # include <glib.h>
--# include "poll.h"
-+# include "vm_poll.h"
- # include "asyncsocket.h"
- # include "vmci_defs.h"
- #include "dataMap.h"
-diff --git a/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c b/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
-index 03700937..f0b49ad7 100644
---- a/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
-+++ b/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
-@@ -48,7 +48,7 @@
- #include "rpcout.h"
- #include "rabbitmqProxyConst.h"
- #include "vm_basic_types.h"
--#include "poll.h"
-+#include "vm_poll.h"
- #ifdef OPEN_VM_TOOLS
- #include "vmci_sockets.h"
- #include "sslDirect.h"
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-add-include-sys-sysmacros.h.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-add-include-sys-sysmacros.h.patch
index f905601d..34628ffb 100644
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-add-include-sys-sysmacros.h.patch
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-add-include-sys-sysmacros.h.patch
@@ -1,7 +1,7 @@
-From 5818acc8032e3247257730376e947330340a07b3 Mon Sep 17 00:00:00 2001
+From 3fa237b3afabc293e563292b8d89265a871626ad Mon Sep 17 00:00:00 2001
From: Martin Kelly <mkelly@xevo.com>
Date: Mon, 22 May 2017 17:00:05 -0700
-Subject: [PATCH 2/2] add #include <sys/sysmacros.h>
+Subject: [PATCH] add #include <sys/sysmacros.h>
In newer glibc versions, the definition for major() has been moved to
sys/sysmacros.h, and using the older version in <sys/types.h> has been
@@ -11,14 +11,14 @@ Upstream-Status: Pending
Signed-off-by: Martin Kelly <mkelly@xevo.com>
---
- lib/wiper/wiperPosix.c | 3 +++
+ open-vm-tools/lib/wiper/wiperPosix.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/open-vm-tools/lib/wiper/wiperPosix.c b/open-vm-tools/lib/wiper/wiperPosix.c
-index d389eee..1f221fc 100644
---- a/lib/wiper/wiperPosix.c
-+++ b/lib/wiper/wiperPosix.c
-@@ -40,6 +40,9 @@
+index bd542410..ccf06293 100644
+--- a/open-vm-tools/lib/wiper/wiperPosix.c
++++ b/open-vm-tools/lib/wiper/wiperPosix.c
+@@ -43,6 +43,9 @@
# include <libgen.h>
# endif /* __FreeBSD_version >= 500000 */
#endif
@@ -28,6 +28,3 @@ index d389eee..1f221fc 100644
#include <unistd.h>
#include "vmware.h"
---
-2.7.4
-
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch
new file mode 100644
index 00000000..0f64eabc
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0002-hgfsServerLinux-Consider-64bit-time_t-possibility.patch
@@ -0,0 +1,41 @@
+From fe56b67a2915a8632ea30604c14241f335dd3c15 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 12 Nov 2019 10:49:46 -0800
+Subject: [PATCH] hgfsServerLinux: Consider 64bit time_t possibility
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ .../lib/hgfsServer/hgfsServerLinux.c | 19 +++++--------------
+ 1 file changed, 5 insertions(+), 14 deletions(-)
+
+diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
+index 03175623..554da67f 100644
+--- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
++++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
+@@ -2561,20 +2561,11 @@ HgfsStatToFileAttr(struct stat *stats, // IN: stat information
+ LOG(4, ("%s: done, permissions %o%o%o%o, size %"FMT64"u\n", __FUNCTION__,
+ attr->specialPerms, attr->ownerPerms, attr->groupPerms,
+ attr->otherPerms, attr->size));
+-#ifdef __FreeBSD__
+-# if !defined(VM_X86_64) && __FreeBSD_version >= 500043
+-# define FMTTIMET ""
+-# else
+-# define FMTTIMET "l"
+-# endif
+-#else
+-# define FMTTIMET "l"
+-#endif
+- LOG(4, ("access: %"FMTTIMET"d/%"FMT64"u \nwrite: %"FMTTIMET"d/%"FMT64"u \n"
+- "attr: %"FMTTIMET"d/%"FMT64"u\n",
+- stats->st_atime, attr->accessTime, stats->st_mtime, attr->writeTime,
+- stats->st_ctime, attr->attrChangeTime));
+-#undef FMTTIMET
++ LOG(4, ("access: %jd/%"FMT64"u \nwrite: %jd/%"FMT64"u \n"
++ "attr: %jd/%"FMT64"u\n",
++ (intmax_t)stats->st_atime, attr->accessTime,
++ (intmax_t)stats->st_mtime, attr->writeTime,
++ (intmax_t)stats->st_ctime, attr->attrChangeTime));
+
+ attr->userId = stats->st_uid;
+ attr->groupId = stats->st_gid;
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-test-for-struct-timespec.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0003-Use-configure-test-for-struct-timespec.patch
index f02d00f8..6d2e4981 100644
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-test-for-struct-timespec.patch
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0003-Use-configure-test-for-struct-timespec.patch
@@ -1,7 +1,7 @@
-From bf1eafb07297711baf9320b1edcca8a3376f117d Mon Sep 17 00:00:00 2001
+From bf9292ff9bd25467a014d6c2070805d163daa4c9 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 18 Nov 2015 09:03:00 +0000
-Subject: [PATCH 05/11] Use configure test for struct timespec
+Subject: [PATCH] Use configure test for struct timespec
Use the configure script to test for struct time spec instead of trying
to keep track of what platforms has it.
@@ -12,11 +12,11 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
open-vm-tools/lib/include/hgfsUtil.h | 8 +-------
2 files changed, 2 insertions(+), 7 deletions(-)
-Index: open-vm-tools/configure.ac
-===================================================================
---- open-vm-tools.orig/configure.ac
-+++ open-vm-tools/configure.ac
-@@ -1127,6 +1127,7 @@ AC_TYPE_OFF_T
+diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac
+index 713ea683..48ff1ef3 100644
+--- a/open-vm-tools/configure.ac
++++ b/open-vm-tools/configure.ac
+@@ -1208,6 +1208,7 @@ AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_CHECK_MEMBERS([struct stat.st_rdev])
@@ -24,10 +24,10 @@ Index: open-vm-tools/configure.ac
AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE
-Index: open-vm-tools/lib/include/hgfsUtil.h
-===================================================================
---- open-vm-tools.orig/lib/include/hgfsUtil.h
-+++ open-vm-tools/lib/include/hgfsUtil.h
+diff --git a/open-vm-tools/lib/include/hgfsUtil.h b/open-vm-tools/lib/include/hgfsUtil.h
+index 609f4c00..a3a022d4 100644
+--- a/open-vm-tools/lib/include/hgfsUtil.h
++++ b/open-vm-tools/lib/include/hgfsUtil.h
@@ -53,13 +53,7 @@
# include <time.h>
# endif
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0006-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
index d1f4eff9..e107ecf2 100644
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0006-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
@@ -1,7 +1,7 @@
-From 31ae6f42458f90d4994a4ad8e2b7673691612c36 Mon Sep 17 00:00:00 2001
+From 5a795b234c617150915a607776c76377948870a6 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 18 Nov 2015 09:10:14 +0000
-Subject: [PATCH 06/11] Fix definition of ALLPERMS and ACCESSPERMS
+Subject: [PATCH] Fix definition of ALLPERMS and ACCESSPERMS
The ALLPERMS and ACCESSPERMS defines are not specified in POSIX so
assume it is not there instead of testing for specific implementations.
@@ -14,11 +14,11 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c | 3 +--
2 files changed, 6 insertions(+), 5 deletions(-)
-Index: open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
-===================================================================
---- open-vm-tools.orig/lib/hgfsServer/hgfsServerLinux.c
-+++ open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
-@@ -107,11 +107,13 @@ typedef struct DirectoryEntry {
+diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
+index f2b7ce67..0e6351a9 100644
+--- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
++++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
+@@ -105,11 +105,13 @@ typedef struct DirectoryEntry {
#endif
/*
@@ -35,11 +35,11 @@ Index: open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
#endif
-Index: open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
-===================================================================
---- open-vm-tools.orig/services/plugins/dndcp/dnd/dndLinux.c
-+++ open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
-@@ -51,7 +51,7 @@
+diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
+index 89133652..7e9c3a91 100644
+--- a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
++++ b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
+@@ -52,7 +52,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)
@@ -48,7 +48,7 @@ Index: open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
#endif
#ifdef __ANDROID__
-@@ -60,7 +60,6 @@
+@@ -61,7 +61,6 @@
*/
#define NO_SETMNTENT
#define NO_ENDMNTENT
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0007-Use-configure-to-test-for-feature-instead-of-platfor.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch
index ad19fb24..c6378b80 100644
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0007-Use-configure-to-test-for-feature-instead-of-platfor.patch
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch
@@ -1,7 +1,7 @@
-From 6cc1c22cc30320f56da552a76bd956db8f255b6a Mon Sep 17 00:00:00 2001
+From 719d60978f979cf2e03771a9b8a62e36c92639f9 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 18 Nov 2015 10:05:07 +0000
-Subject: [PATCH 07/11] Use configure to test for feature instead of platform
+Subject: [PATCH] Use configure to test for feature instead of platform
Test for various functions instead of trying to keep track of what
platform and what version of the given platform has support for what.
@@ -21,15 +21,15 @@ This is needed for musl libc.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
open-vm-tools/configure.ac | 4 ++++
- open-vm-tools/lib/misc/idLinux.c | 30 ++++++++++++++----------------
- open-vm-tools/lib/nicInfo/nicInfoPosix.c | 8 ++++++--
- 3 files changed, 24 insertions(+), 18 deletions(-)
+ open-vm-tools/lib/misc/idLinux.c | 30 +++++++++++-------------
+ open-vm-tools/lib/nicInfo/nicInfoPosix.c | 6 ++++-
+ 3 files changed, 23 insertions(+), 17 deletions(-)
-Index: open-vm-tools/configure.ac
-===================================================================
---- open-vm-tools.orig/configure.ac
-+++ open-vm-tools/configure.ac
-@@ -892,6 +892,7 @@ AC_CHECK_FUNCS(
+diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac
+index 48ff1ef3..71e684bb 100644
+--- a/open-vm-tools/configure.ac
++++ b/open-vm-tools/configure.ac
+@@ -897,6 +897,7 @@ AC_CHECK_FUNCS(
AC_CHECK_FUNCS([ecvt])
AC_CHECK_FUNCS([fcvt])
@@ -37,7 +37,7 @@ Index: open-vm-tools/configure.ac
AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes])
-@@ -1076,10 +1077,13 @@ AC_PATH_PROG(
+@@ -1145,10 +1146,13 @@ fi
###
AC_CHECK_HEADERS([crypt.h])
@@ -51,10 +51,10 @@ Index: open-vm-tools/configure.ac
AC_CHECK_HEADERS([sys/inttypes.h])
AC_CHECK_HEADERS([sys/io.h])
AC_CHECK_HEADERS([sys/param.h]) # Required to make the sys/user.h check work correctly on FreeBSD
-Index: open-vm-tools/lib/misc/idLinux.c
-===================================================================
---- open-vm-tools.orig/lib/misc/idLinux.c
-+++ open-vm-tools/lib/misc/idLinux.c
+diff --git a/open-vm-tools/lib/misc/idLinux.c b/open-vm-tools/lib/misc/idLinux.c
+index b950cf84..1dcfb508 100644
+--- a/open-vm-tools/lib/misc/idLinux.c
++++ b/open-vm-tools/lib/misc/idLinux.c
@@ -27,12 +27,9 @@
#include <sys/syscall.h>
#include <string.h>
@@ -114,10 +114,10 @@ Index: open-vm-tools/lib/misc/idLinux.c
#endif
}
#endif
-Index: open-vm-tools/lib/nicInfo/nicInfoPosix.c
-===================================================================
---- open-vm-tools.orig/lib/nicInfo/nicInfoPosix.c
-+++ open-vm-tools/lib/nicInfo/nicInfoPosix.c
+diff --git a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c
+index a22981d5..b4e08681 100644
+--- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c
++++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c
@@ -34,9 +34,13 @@
#include <sys/socket.h>
#include <sys/stat.h>
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0011-Use-configure-test-for-sys-stat.h-include.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0006-Use-configure-test-for-sys-stat.h-include.patch
index 78722390..9a227f9e 100644
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0011-Use-configure-test-for-sys-stat.h-include.patch
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0006-Use-configure-test-for-sys-stat.h-include.patch
@@ -1,7 +1,7 @@
-From 95c6184d9ff70a47c41768850923a96de9e544aa Mon Sep 17 00:00:00 2001
+From 11adcf43a1e7aa39ee4d82fa567f37e5b0c6ca81 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 18 Nov 2015 10:41:01 +0000
-Subject: [PATCH 11/11] Use configure test for sys/stat.h include
+Subject: [PATCH] Use configure test for sys/stat.h include
This is needed for musl libc.
@@ -10,10 +10,10 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
open-vm-tools/services/plugins/vix/vixTools.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: open-vm-tools/services/plugins/vix/vixTools.c
-===================================================================
---- open-vm-tools.orig/services/plugins/vix/vixTools.c
-+++ open-vm-tools/services/plugins/vix/vixTools.c
+diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c
+index e5273786..cabc4137 100644
+--- a/open-vm-tools/services/plugins/vix/vixTools.c
++++ b/open-vm-tools/services/plugins/vix/vixTools.c
@@ -66,7 +66,7 @@
#include <unistd.h>
#endif
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0007-Fix-subdir-objects-configure-error.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0007-Fix-subdir-objects-configure-error.patch
new file mode 100644
index 00000000..11be2d4a
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0007-Fix-subdir-objects-configure-error.patch
@@ -0,0 +1,24 @@
+From cf1284fda8fb22a2b27cb2ce7962f166166e74c3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jun 2018 23:48:04 -0700
+Subject: [PATCH] Fix subdir objects configure error
+
+Fix build on musl while here
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ open-vm-tools/configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac
+index 71e684bb..b76a7966 100644
+--- a/open-vm-tools/configure.ac
++++ b/open-vm-tools/configure.ac
+@@ -303,6 +303,7 @@ AC_ARG_ENABLE(
+ [],
+ [enable_resolutionkms="auto"])
+
++AM_INIT_AUTOMAKE([subdir-objects])
+ AM_INIT_AUTOMAKE
+
+ ###
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-include-poll.h-instead-of-sys-poll.h.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0008-include-poll.h-instead-of-sys-poll.h.patch
index 88205811..814b9e3b 100644
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-include-poll.h-instead-of-sys-poll.h.patch
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0008-include-poll.h-instead-of-sys-poll.h.patch
@@ -1,4 +1,4 @@
-From 4981bb3013d7f1e40e44618076d99af3484eedea Mon Sep 17 00:00:00 2001
+From e4f0b99d90e26b15106f634caad1c3dea9e09cb8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 Jun 2018 23:02:50 -0700
Subject: [PATCH] include poll.h instead of sys/poll.h
@@ -10,10 +10,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
open-vm-tools/lib/asyncsocket/asyncsocket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/lib/asyncsocket/asyncsocket.c b/lib/asyncsocket/asyncsocket.c
-index 13908679..e0a68e7e 100644
---- a/lib/asyncsocket/asyncsocket.c
-+++ b/lib/asyncsocket/asyncsocket.c
+diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c
+index 65b07109..b41aa29d 100644
+--- a/open-vm-tools/lib/asyncsocket/asyncsocket.c
++++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c
@@ -69,8 +69,8 @@
#else
#include <stddef.h>
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch
new file mode 100644
index 00000000..9cf54f6f
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0009-Rename-poll.h-to-vm_poll.h.patch
@@ -0,0 +1,742 @@
+From 8793466326dd10b0d2dbb83c64beff5cc8c0fc7d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jun 2018 23:11:58 -0700
+Subject: [PATCH] Rename poll.h to vm_poll.h
+
+musl libc's system headers pulls in open-vm-tools' poll.h. To avoid this
+we rename poll.h to vm_poll.h.
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ open-vm-tools/lib/asyncsocket/asyncsocket.c | 2 +-
+ open-vm-tools/lib/hgfsServer/hgfsServer.c | 2 +-
+ open-vm-tools/lib/include/asyncsocket.h | 2 +-
+ open-vm-tools/lib/include/pollImpl.h | 2 +-
+ open-vm-tools/lib/include/{poll.h => vm_poll.h} | 2 +-
+ open-vm-tools/lib/rpcIn/rpcin.c | 2 +-
+ .../services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+ rename open-vm-tools/lib/include/{poll.h => vm_poll.h} (99%)
+
+--- a/open-vm-tools/lib/asyncsocket/asyncsocket.c
++++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c
+@@ -86,7 +86,7 @@
+ #include "random.h"
+ #include "asyncsocket.h"
+ #include "asyncSocketBase.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "log.h"
+ #include "err.h"
+ #include "hostinfo.h"
+--- a/open-vm-tools/lib/hgfsServer/hgfsServer.c
++++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c
+@@ -48,7 +48,7 @@
+ #include "hgfsServerOplock.h"
+ #include "hgfsDirNotify.h"
+ #include "userlock.h"
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "mutexRankLib.h"
+ #include "vm_basic_asm.h"
+ #include "unicodeOperations.h"
+--- a/open-vm-tools/lib/include/asyncsocket.h
++++ b/open-vm-tools/lib/include/asyncsocket.h
+@@ -164,7 +164,7 @@ typedef struct AsyncSocket AsyncSocket;
+ * Or the client can specify its favorite poll class and locking behavior.
+ * Use of IVmdbPoll is only supported for regular sockets and for Attach.
+ */
+-#include "poll.h"
++#include "vm_poll.h"
+ struct IVmdbPoll;
+ typedef struct AsyncSocketPollParams {
+ int flags; /* Default 0, only POLL_FLAG_NO_BULL is valid */
+--- a/open-vm-tools/lib/include/pollImpl.h
++++ b/open-vm-tools/lib/include/pollImpl.h
+@@ -44,7 +44,7 @@
+ #define INCLUDE_ALLOW_USERLEVEL
+ #include "includeCheck.h"
+
+-#include "poll.h"
++#include "vm_poll.h"
+ #include "vm_basic_asm.h"
+
+ #if defined(__cplusplus)
+--- a/open-vm-tools/lib/include/poll.h
++++ /dev/null
+@@ -1,330 +0,0 @@
+-/*********************************************************
+- * Copyright (C) 1998-2018 VMware, Inc. All rights reserved.
+- *
+- * This program is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU Lesser General Public License as published
+- * by the Free Software Foundation version 2.1 and no later version.
+- *
+- * This program is distributed in the hope that it will be useful, but
+- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+- * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+- * License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public License
+- * along with this program; if not, write to the Free Software Foundation, Inc.,
+- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- *********************************************************/
+-
+-/*********************************************************
+- * The contents of this file are subject to the terms of the Common
+- * Development and Distribution License (the "License") version 1.0
+- * and no later version. You may not use this file except in
+- * compliance with the License.
+- *
+- * You can obtain a copy of the License at
+- * http://www.opensource.org/licenses/cddl1.php
+- *
+- * See the License for the specific language governing permissions
+- * and limitations under the License.
+- *
+- *********************************************************/
+-
+-
+-#ifndef _POLL_H_
+-#define _POLL_H_
+-
+-#define INCLUDE_ALLOW_USERLEVEL
+-#define INCLUDE_ALLOW_VMCORE
+-#include "includeCheck.h"
+-
+-#include "vm_basic_types.h"
+-#include "vm_basic_defs.h"
+-#include "vmware.h"
+-#include "userlock.h"
+-
+-#if defined(__cplusplus)
+-extern "C" {
+-#endif
+-
+-#ifdef _WIN32
+-#define HZ 100
+-#elif defined linux
+-#include <asm/param.h>
+-#elif __APPLE__
+-#include <TargetConditionals.h>
+-/*
+- * Old SDKs don't define TARGET_OS_IPHONE at all.
+- * New ones define it to 0 on Mac OS X, 1 on iOS.
+- */
+-#if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0
+-#include <sys/kernel.h>
+-#endif
+-#include <sys/poll.h>
+-#define HZ 100
+-#endif
+-#ifdef __ANDROID__
+-/*
+- * <poll.h> of android should be included, but its name is same
+- * with this file. So its content is put here to avoid conflict.
+- */
+-#include <asm/poll.h>
+-#define HZ 100
+-typedef unsigned int nfds_t;
+-int poll(struct pollfd *, nfds_t, long);
+-#endif
+-
+-
+-/*
+- * Poll event types: each type has a different reason for firing,
+- * or condition that must be met before firing.
+- */
+-
+-typedef enum {
+- /*
+- * Actual Poll queue types against which you can register callbacks.
+- */
+- POLL_VIRTUALREALTIME = -1, /* Negative because it doesn't have its own Q */
+- POLL_VTIME = 0,
+- POLL_REALTIME,
+- POLL_DEVICE,
+- POLL_MAIN_LOOP,
+- POLL_NUM_QUEUES
+-} PollEventType;
+-
+-
+-/*
+- * Classes of events
+- *
+- * These are the predefined classes. More can be declared
+- * with Poll_AllocClass().
+- */
+-
+-typedef enum PollClass {
+- POLL_CLASS_MAIN,
+- POLL_CLASS_PAUSE,
+- POLL_CLASS_IPC,
+- POLL_CLASS_CPT,
+- POLL_CLASS_MKS,
+- POLL_FIXED_CLASSES,
+- POLL_DEFAULT_FIXED_CLASSES,
+- /* Size enum to maximum */
+- POLL_MAX_CLASSES = 31,
+-} PollClass;
+-
+-/*
+- * Do not use; Special pseudo private poll class supported by
+- * PollDefault only
+- */
+-#define POLL_DEFAULT_CLASS_NET POLL_FIXED_CLASSES
+-#define POLL_DEFAULT_CS_NET PollClassSet_Singleton(POLL_DEFAULT_CLASS_NET)
+-
+-/*
+- * Each callback is registered in a set of classes
+- */
+-
+-typedef struct PollClassSet {
+- uintptr_t bits;
+-} PollClassSet;
+-
+-/* An empty PollClassSet. */
+-static INLINE PollClassSet
+-PollClassSet_Empty(void)
+-{
+- PollClassSet set = { 0 };
+- return set;
+-}
+-
+-/* A PollClassSet with the single member. */
+-static INLINE PollClassSet
+-PollClassSet_Singleton(PollClass c)
+-{
+- PollClassSet s = PollClassSet_Empty();
+-
+- ASSERT_ON_COMPILE(POLL_MAX_CLASSES < sizeof s.bits * 8);
+- ASSERT(c < POLL_MAX_CLASSES);
+-
+- s.bits = CONST3264U(1) << c;
+- return s;
+-}
+-
+-/* Combine two PollClassSets. */
+-static INLINE PollClassSet
+-PollClassSet_Union(PollClassSet lhs, PollClassSet rhs)
+-{
+- PollClassSet set;
+- set.bits = lhs.bits | rhs.bits;
+- return set;
+-}
+-
+-/* Add single class to PollClassSet. */
+-static INLINE PollClassSet
+-PollClassSet_Include(PollClassSet set, PollClass c)
+-{
+- return PollClassSet_Union(set, PollClassSet_Singleton(c));
+-}
+-
+-
+-#define POLL_CS_MAIN PollClassSet_Singleton(POLL_CLASS_MAIN)
+-#define POLL_CS_PAUSE PollClassSet_Union(POLL_CS_MAIN, \
+- PollClassSet_Singleton(POLL_CLASS_PAUSE))
+-#define POLL_CS_CPT PollClassSet_Union(POLL_CS_PAUSE, \
+- PollClassSet_Singleton(POLL_CLASS_CPT))
+-#define POLL_CS_IPC PollClassSet_Union(POLL_CS_CPT, \
+- PollClassSet_Singleton(POLL_CLASS_IPC))
+-#define POLL_CS_VMDB POLL_CS_PAUSE /* POLL_CLASS_VMDB is retired */
+-#define POLL_CS_MKS PollClassSet_Singleton(POLL_CLASS_MKS)
+-/*
+- * DANGER. You don't need POLL_CS_ALWAYS. Really. So don't use it.
+- */
+-#define POLL_CS_ALWAYS PollClassSet_Union(POLL_CS_CPT, POLL_CS_IPC)
+-
+-/*
+- * Poll class-set taxonomy:
+- * POLL_CS_MAIN
+- * - Unless you NEED another class, use POLL_CS_MAIN.
+- * POLL_CS_PAUSE
+- * - For callbacks that must occur even if the guest is paused.
+- * Most VMDB or Foundry commands are in this category.
+- * POLL_CS_CPT
+- * - Only for callbacks which can trigger intermediate Checkpoint
+- * transitions.
+- * The ONLY such callback is Migrate.
+- * POLL_CS_IPC
+- * - Only for callbacks which can contain Msg_(Post|Hint|Question)
+- * responses, and for signal handlers (why)?
+- * Vigor, VMDB, and Foundry can contain Msg_* responses.
+- * POLL_CS_MKS
+- * - Callback runs in MKS thread.
+- * POLL_CS_ALWAYS
+- * - Only for events that must be processed immediately.
+- * The ONLY such callback is OvhdMemVmxSizeCheck.
+- */
+-
+-
+-/*
+- * Poll_Callback flags
+- */
+-
+-#define POLL_FLAG_PERIODIC 0x01 // keep after firing
+-#define POLL_FLAG_REMOVE_AT_POWEROFF 0x02 // self-explanatory
+-#define POLL_FLAG_READ 0x04 // device is ready for reading
+-#define POLL_FLAG_WRITE 0x08 // device is ready for writing
+-#define POLL_FLAG_SOCKET 0x10 // device is a Windows socket
+-#define POLL_FLAG_NO_BULL 0x20 // callback does its own locking
+-#define POLL_FLAG_WINSOCK 0x40 // Winsock style write events
+-#define POLL_FLAG_FD 0x80 // device is a Windows file descriptor.
+-#define POLL_FLAG_ACCEPT_INVALID_FDS 0x100 // For broken 3rd party libs, e.g. curl
+-#define POLL_FLAG_THUNK_TO_WND 0x200 // thunk callback to window message loop
+-
+-
+-typedef void (*PollerFunction)(void *clientData);
+-typedef void (*PollerFireWrapper)(PollerFunction func,
+- void *funcData,
+- void *wrapperData);
+-typedef Bool (*PollerErrorFn)(const char *errorStr);
+-
+-/*
+- * Initialisers:
+- *
+- * For the sake of convenience, we declare the initialisers
+- * for custom implmentations here, even though the actual
+- * implementations are distinct from the core poll code.
+- */
+-
+-typedef struct PollOptions {
+- Bool locked; // Use internal MXUser for locking
+- Bool allowFullQueue; // Don't assert when device event queue is full.
+- VThreadID windowsMsgThread; // thread that processes Windows messages
+- PollerFireWrapper fireWrapperFn; // optional; may be useful for stats
+- void *fireWrapperData; // optional
+- PollerErrorFn errorFn; // optional; called upon unrecoverable error
+-} PollOptions;
+-
+-
+-void Poll_InitDefault(void);
+-void Poll_InitDefaultEx(const PollOptions *opts);
+-void Poll_InitGtk(void); // On top of glib for Linux
+-void Poll_InitCF(void); // On top of CoreFoundation for OSX
+-
+-
+-/*
+- * Functions
+- */
+-int Poll_SocketPair(Bool vmci, Bool stream, int fds[2]);
+-void Poll_Loop(Bool loop, Bool *exit, PollClass c);
+-void Poll_LoopTimeout(Bool loop, Bool *exit, PollClass c, int timeout);
+-Bool Poll_LockingEnabled(void);
+-void Poll_Exit(void);
+-
+-
+-/*
+- * Poll_Callback adds a callback regardless of whether an identical one exists.
+- * The exception to this rule is POLL_DEVICE callbacks: there is a maximum of
+- * one read and one write callback per fd.
+- *
+- * Poll_CallbackRemove removes one callback. If there are multiple identical
+- * callbacks, which one is removed is an implementation detail. Note that in
+- * the case of POLL_DEVICE and POLL_REALTIME callbacks, the fd/delay used to
+- * create the callback is not specified when removing, so all callbacks
+- * of those types with the same flags, function, and clientData are considered
+- * "identical" even if their fd/delay differed.
+- */
+-
+-VMwareStatus Poll_Callback(PollClassSet classSet,
+- int flags,
+- PollerFunction f,
+- void *clientData,
+- PollEventType type,
+- PollDevHandle info, // fd/microsec delay
+- MXUserRecLock *lck);
+-Bool Poll_CallbackRemove(PollClassSet classSet,
+- int flags,
+- PollerFunction f,
+- void *clientData,
+- PollEventType type);
+-Bool Poll_CallbackRemoveOneByCB(PollClassSet classSet,
+- int flags,
+- PollerFunction f,
+- PollEventType type,
+- void **clientData);
+-
+-void Poll_NotifyChange(PollClassSet classSet);
+-
+-/*
+- * Wrappers for Poll_Callback and Poll_CallbackRemove that present
+- * simpler subsets of those interfaces.
+- */
+-
+-VMwareStatus Poll_CB_Device(PollerFunction f,
+- void *clientData,
+- PollDevHandle device,
+- Bool periodic);
+-
+-Bool Poll_CB_DeviceRemove(PollerFunction f,
+- void *clientData,
+- Bool periodic);
+-
+-
+-VMwareStatus Poll_CB_RTime(PollerFunction f,
+- void *clientData,
+- int64 delay, // microseconds
+- Bool periodic,
+- MXUserRecLock *lock);
+-
+-Bool Poll_CB_RTimeRemove(PollerFunction f,
+- void *clientData,
+- Bool periodic);
+-
+-
+-#ifdef _WIN32
+-void Poll_SetPumpsWindowsMessages(Bool pumps);
+-void Poll_SetWindowMessageRecipient(HWND hWnd, UINT msg, Bool alwaysThunk);
+-Bool Poll_FireWndCallback(void *lparam);
+-#endif
+-
+-#if defined(__cplusplus)
+-} // extern "C"
+-#endif
+-
+-#endif // _POLL_H_
+--- /dev/null
++++ b/open-vm-tools/lib/include/vm_poll.h
+@@ -0,0 +1,330 @@
++/*********************************************************
++ * Copyright (C) 1998-2018 VMware, Inc. All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU Lesser General Public License as published
++ * by the Free Software Foundation version 2.1 and no later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++ * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
++ * License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * along with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ *********************************************************/
++
++/*********************************************************
++ * The contents of this file are subject to the terms of the Common
++ * Development and Distribution License (the "License") version 1.0
++ * and no later version. You may not use this file except in
++ * compliance with the License.
++ *
++ * You can obtain a copy of the License at
++ * http://www.opensource.org/licenses/cddl1.php
++ *
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
++ *
++ *********************************************************/
++
++
++#ifndef _POLL_H_
++#define _POLL_H_
++
++#define INCLUDE_ALLOW_USERLEVEL
++#define INCLUDE_ALLOW_VMCORE
++#include "includeCheck.h"
++
++#include "vm_basic_types.h"
++#include "vm_basic_defs.h"
++#include "vmware.h"
++#include "userlock.h"
++
++#if defined(__cplusplus)
++extern "C" {
++#endif
++
++#ifdef _WIN32
++#define HZ 100
++#elif defined linux
++#include <asm/param.h>
++#elif __APPLE__
++#include <TargetConditionals.h>
++/*
++ * Old SDKs don't define TARGET_OS_IPHONE at all.
++ * New ones define it to 0 on Mac OS X, 1 on iOS.
++ */
++#if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0
++#include <sys/kernel.h>
++#endif
++#include <poll.h>
++#define HZ 100
++#endif
++#ifdef __ANDROID__
++/*
++ * <poll.h> of android should be included, but its name is same
++ * with this file. So its content is put here to avoid conflict.
++ */
++#include <asm/poll.h>
++#define HZ 100
++typedef unsigned int nfds_t;
++int poll(struct pollfd *, nfds_t, long);
++#endif
++
++
++/*
++ * Poll event types: each type has a different reason for firing,
++ * or condition that must be met before firing.
++ */
++
++typedef enum {
++ /*
++ * Actual Poll queue types against which you can register callbacks.
++ */
++ POLL_VIRTUALREALTIME = -1, /* Negative because it doesn't have its own Q */
++ POLL_VTIME = 0,
++ POLL_REALTIME,
++ POLL_DEVICE,
++ POLL_MAIN_LOOP,
++ POLL_NUM_QUEUES
++} PollEventType;
++
++
++/*
++ * Classes of events
++ *
++ * These are the predefined classes. More can be declared
++ * with Poll_AllocClass().
++ */
++
++typedef enum PollClass {
++ POLL_CLASS_MAIN,
++ POLL_CLASS_PAUSE,
++ POLL_CLASS_IPC,
++ POLL_CLASS_CPT,
++ POLL_CLASS_MKS,
++ POLL_FIXED_CLASSES,
++ POLL_DEFAULT_FIXED_CLASSES,
++ /* Size enum to maximum */
++ POLL_MAX_CLASSES = 31,
++} PollClass;
++
++/*
++ * Do not use; Special pseudo private poll class supported by
++ * PollDefault only
++ */
++#define POLL_DEFAULT_CLASS_NET POLL_FIXED_CLASSES
++#define POLL_DEFAULT_CS_NET PollClassSet_Singleton(POLL_DEFAULT_CLASS_NET)
++
++/*
++ * Each callback is registered in a set of classes
++ */
++
++typedef struct PollClassSet {
++ uintptr_t bits;
++} PollClassSet;
++
++/* An empty PollClassSet. */
++static INLINE PollClassSet
++PollClassSet_Empty(void)
++{
++ PollClassSet set = { 0 };
++ return set;
++}
++
++/* A PollClassSet with the single member. */
++static INLINE PollClassSet
++PollClassSet_Singleton(PollClass c)
++{
++ PollClassSet s = PollClassSet_Empty();
++
++ ASSERT_ON_COMPILE(POLL_MAX_CLASSES < sizeof s.bits * 8);
++ ASSERT(c < POLL_MAX_CLASSES);
++
++ s.bits = CONST3264U(1) << c;
++ return s;
++}
++
++/* Combine two PollClassSets. */
++static INLINE PollClassSet
++PollClassSet_Union(PollClassSet lhs, PollClassSet rhs)
++{
++ PollClassSet set;
++ set.bits = lhs.bits | rhs.bits;
++ return set;
++}
++
++/* Add single class to PollClassSet. */
++static INLINE PollClassSet
++PollClassSet_Include(PollClassSet set, PollClass c)
++{
++ return PollClassSet_Union(set, PollClassSet_Singleton(c));
++}
++
++
++#define POLL_CS_MAIN PollClassSet_Singleton(POLL_CLASS_MAIN)
++#define POLL_CS_PAUSE PollClassSet_Union(POLL_CS_MAIN, \
++ PollClassSet_Singleton(POLL_CLASS_PAUSE))
++#define POLL_CS_CPT PollClassSet_Union(POLL_CS_PAUSE, \
++ PollClassSet_Singleton(POLL_CLASS_CPT))
++#define POLL_CS_IPC PollClassSet_Union(POLL_CS_CPT, \
++ PollClassSet_Singleton(POLL_CLASS_IPC))
++#define POLL_CS_VMDB POLL_CS_PAUSE /* POLL_CLASS_VMDB is retired */
++#define POLL_CS_MKS PollClassSet_Singleton(POLL_CLASS_MKS)
++/*
++ * DANGER. You don't need POLL_CS_ALWAYS. Really. So don't use it.
++ */
++#define POLL_CS_ALWAYS PollClassSet_Union(POLL_CS_CPT, POLL_CS_IPC)
++
++/*
++ * Poll class-set taxonomy:
++ * POLL_CS_MAIN
++ * - Unless you NEED another class, use POLL_CS_MAIN.
++ * POLL_CS_PAUSE
++ * - For callbacks that must occur even if the guest is paused.
++ * Most VMDB or Foundry commands are in this category.
++ * POLL_CS_CPT
++ * - Only for callbacks which can trigger intermediate Checkpoint
++ * transitions.
++ * The ONLY such callback is Migrate.
++ * POLL_CS_IPC
++ * - Only for callbacks which can contain Msg_(Post|Hint|Question)
++ * responses, and for signal handlers (why)?
++ * Vigor, VMDB, and Foundry can contain Msg_* responses.
++ * POLL_CS_MKS
++ * - Callback runs in MKS thread.
++ * POLL_CS_ALWAYS
++ * - Only for events that must be processed immediately.
++ * The ONLY such callback is OvhdMemVmxSizeCheck.
++ */
++
++
++/*
++ * Poll_Callback flags
++ */
++
++#define POLL_FLAG_PERIODIC 0x01 // keep after firing
++#define POLL_FLAG_REMOVE_AT_POWEROFF 0x02 // self-explanatory
++#define POLL_FLAG_READ 0x04 // device is ready for reading
++#define POLL_FLAG_WRITE 0x08 // device is ready for writing
++#define POLL_FLAG_SOCKET 0x10 // device is a Windows socket
++#define POLL_FLAG_NO_BULL 0x20 // callback does its own locking
++#define POLL_FLAG_WINSOCK 0x40 // Winsock style write events
++#define POLL_FLAG_FD 0x80 // device is a Windows file descriptor.
++#define POLL_FLAG_ACCEPT_INVALID_FDS 0x100 // For broken 3rd party libs, e.g. curl
++#define POLL_FLAG_THUNK_TO_WND 0x200 // thunk callback to window message loop
++
++
++typedef void (*PollerFunction)(void *clientData);
++typedef void (*PollerFireWrapper)(PollerFunction func,
++ void *funcData,
++ void *wrapperData);
++typedef Bool (*PollerErrorFn)(const char *errorStr);
++
++/*
++ * Initialisers:
++ *
++ * For the sake of convenience, we declare the initialisers
++ * for custom implmentations here, even though the actual
++ * implementations are distinct from the core poll code.
++ */
++
++typedef struct PollOptions {
++ Bool locked; // Use internal MXUser for locking
++ Bool allowFullQueue; // Don't assert when device event queue is full.
++ VThreadID windowsMsgThread; // thread that processes Windows messages
++ PollerFireWrapper fireWrapperFn; // optional; may be useful for stats
++ void *fireWrapperData; // optional
++ PollerErrorFn errorFn; // optional; called upon unrecoverable error
++} PollOptions;
++
++
++void Poll_InitDefault(void);
++void Poll_InitDefaultEx(const PollOptions *opts);
++void Poll_InitGtk(void); // On top of glib for Linux
++void Poll_InitCF(void); // On top of CoreFoundation for OSX
++
++
++/*
++ * Functions
++ */
++int Poll_SocketPair(Bool vmci, Bool stream, int fds[2]);
++void Poll_Loop(Bool loop, Bool *exit, PollClass c);
++void Poll_LoopTimeout(Bool loop, Bool *exit, PollClass c, int timeout);
++Bool Poll_LockingEnabled(void);
++void Poll_Exit(void);
++
++
++/*
++ * Poll_Callback adds a callback regardless of whether an identical one exists.
++ * The exception to this rule is POLL_DEVICE callbacks: there is a maximum of
++ * one read and one write callback per fd.
++ *
++ * Poll_CallbackRemove removes one callback. If there are multiple identical
++ * callbacks, which one is removed is an implementation detail. Note that in
++ * the case of POLL_DEVICE and POLL_REALTIME callbacks, the fd/delay used to
++ * create the callback is not specified when removing, so all callbacks
++ * of those types with the same flags, function, and clientData are considered
++ * "identical" even if their fd/delay differed.
++ */
++
++VMwareStatus Poll_Callback(PollClassSet classSet,
++ int flags,
++ PollerFunction f,
++ void *clientData,
++ PollEventType type,
++ PollDevHandle info, // fd/microsec delay
++ MXUserRecLock *lck);
++Bool Poll_CallbackRemove(PollClassSet classSet,
++ int flags,
++ PollerFunction f,
++ void *clientData,
++ PollEventType type);
++Bool Poll_CallbackRemoveOneByCB(PollClassSet classSet,
++ int flags,
++ PollerFunction f,
++ PollEventType type,
++ void **clientData);
++
++void Poll_NotifyChange(PollClassSet classSet);
++
++/*
++ * Wrappers for Poll_Callback and Poll_CallbackRemove that present
++ * simpler subsets of those interfaces.
++ */
++
++VMwareStatus Poll_CB_Device(PollerFunction f,
++ void *clientData,
++ PollDevHandle device,
++ Bool periodic);
++
++Bool Poll_CB_DeviceRemove(PollerFunction f,
++ void *clientData,
++ Bool periodic);
++
++
++VMwareStatus Poll_CB_RTime(PollerFunction f,
++ void *clientData,
++ int64 delay, // microseconds
++ Bool periodic,
++ MXUserRecLock *lock);
++
++Bool Poll_CB_RTimeRemove(PollerFunction f,
++ void *clientData,
++ Bool periodic);
++
++
++#ifdef _WIN32
++void Poll_SetPumpsWindowsMessages(Bool pumps);
++void Poll_SetWindowMessageRecipient(HWND hWnd, UINT msg, Bool alwaysThunk);
++Bool Poll_FireWndCallback(void *lparam);
++#endif
++
++#if defined(__cplusplus)
++} // extern "C"
++#endif
++
++#endif // _POLL_H_
+--- a/open-vm-tools/lib/rpcIn/rpcin.c
++++ b/open-vm-tools/lib/rpcIn/rpcin.c
+@@ -57,7 +57,7 @@
+
+ #if defined(VMTOOLS_USE_VSOCKET)
+ # include <glib.h>
+-# include "poll.h"
++# include "vm_poll.h"
+ # include "asyncsocket.h"
+ # include "vmci_defs.h"
+ #include "dataMap.h"
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0003-use-posix-strerror_r-unless-on-gnu-libc-system.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0010-use-posix-strerror_r-unless-on-gnu-libc-system.patch
index c7d34c5c..784b4fc6 100644
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0003-use-posix-strerror_r-unless-on-gnu-libc-system.patch
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0010-use-posix-strerror_r-unless-on-gnu-libc-system.patch
@@ -1,4 +1,4 @@
-From a2e7d9273261c5c5cbc33796900f415097f5455e Mon Sep 17 00:00:00 2001
+From e86a259e1ce19c70ecfdece69ab53a07c63a34e1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 Jun 2018 23:16:53 -0700
Subject: [PATCH] use posix strerror_r unless on gnu libc system
@@ -8,10 +8,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
open-vm-tools/lib/err/errPosix.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
-diff --git a/lib/err/errPosix.c b/lib/err/errPosix.c
+diff --git a/open-vm-tools/lib/err/errPosix.c b/open-vm-tools/lib/err/errPosix.c
index c81b4c13..7a403640 100644
---- a/lib/err/errPosix.c
-+++ b/lib/err/errPosix.c
+--- a/open-vm-tools/lib/err/errPosix.c
++++ b/open-vm-tools/lib/err/errPosix.c
@@ -31,6 +31,7 @@
#include <errno.h>
#include <string.h>
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Use-uintmax_t-for-handling-rlim_t.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0011-Use-uintmax_t-for-handling-rlim_t.patch
index e802dca4..0a1d0087 100644
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0004-Use-uintmax_t-for-handling-rlim_t.patch
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0011-Use-uintmax_t-for-handling-rlim_t.patch
@@ -1,4 +1,4 @@
-From e694a122c1ff32d8b951ae55756796f9576d23ed Mon Sep 17 00:00:00 2001
+From 18eea61a7a768c6c3b57c6683c7bef7049f0f6ab Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 Jun 2018 23:37:09 -0700
Subject: [PATCH] Use uintmax_t for handling rlim_t
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c
-index 2e73707d..a2fdb850 100644
---- a/lib/hgfsServer/hgfsServerLinux.c
-+++ b/lib/hgfsServer/hgfsServerLinux.c
+diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
+index 0e6351a9..a2ee1740 100644
+--- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
++++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
@@ -5294,8 +5294,8 @@ HgfsWriteCheckIORange(off_t offset, // IN:
goto exit;
}
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Use-off64_t-instead-of-__off64_t.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0012-Use-off64_t-instead-of-__off64_t.patch
index 432496f2..d69b74e2 100644
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0001-Use-off64_t-instead-of-__off64_t.patch
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0012-Use-off64_t-instead-of-__off64_t.patch
@@ -1,4 +1,4 @@
-From 43d859f9d5eecdc0fdc1a6bf539bcde4a152e6f5 Mon Sep 17 00:00:00 2001
+From 123c690f12f560022305b0cf19499e7f81a690ae Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 27 Aug 2018 23:22:21 -0700
Subject: [PATCH] Use off64_t instead of __off64_t
@@ -9,13 +9,13 @@ unknown type name '__off64_t'
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- lib/file/fileIOPosix.c | 4 ++--
+ open-vm-tools/lib/file/fileIOPosix.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/lib/file/fileIOPosix.c b/lib/file/fileIOPosix.c
+diff --git a/open-vm-tools/lib/file/fileIOPosix.c b/open-vm-tools/lib/file/fileIOPosix.c
index 23108279..bcd2ddc5 100644
---- a/lib/file/fileIOPosix.c
-+++ b/lib/file/fileIOPosix.c
+--- a/open-vm-tools/lib/file/fileIOPosix.c
++++ b/open-vm-tools/lib/file/fileIOPosix.c
@@ -206,10 +206,10 @@ static AlignedPool alignedPool;
* the symbols (and anyone building XOPEN<700 gets nothing).
*/
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0013-misc-Do-not-print-NULL-string-into-logs.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0013-misc-Do-not-print-NULL-string-into-logs.patch
new file mode 100644
index 00000000..3e4753b2
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0013-misc-Do-not-print-NULL-string-into-logs.patch
@@ -0,0 +1,27 @@
+From cfc6839362bd96bf2f42954160f16a60bf1de377 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Dec 2018 19:59:02 -0800
+Subject: [PATCH] misc: Do not print NULL string into logs
+
+string format %s is getting a NULL pointer for 'expand'
+parameter always since the check for chunks[i] == NULL will ensure that
+its always null when the Log() API is called
+
+Upstream-Status: Submitted [https://github.com/vmware/open-vm-tools/pull/312]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ open-vm-tools/lib/misc/util_misc.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/open-vm-tools/lib/misc/util_misc.c
++++ b/open-vm-tools/lib/misc/util_misc.c
+@@ -719,7 +719,7 @@ Util_ExpandString(const char *fileName)
+ ASSERT(!freeChunk[i]);
+ chunks[i] = expand;
+ if (chunks[i] == NULL) {
+- Log("%s: Cannot allocate memory to expand $ in \"%s\".\n",
++ Log("%s: Cannot allocate memory to expand in \"%s\".\n",
+ __FUNCTION__, fileName);
+ goto out;
+ }
diff --git a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/fix-subdir-objects-configure-error.patch b/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/fix-subdir-objects-configure-error.patch
deleted file mode 100644
index 1a6bfdb0..00000000
--- a/external/meta-openembedded/meta-oe/recipes-support/open-vm-tools/open-vm-tools/fix-subdir-objects-configure-error.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: open-vm-tools/configure.ac
-===================================================================
---- open-vm-tools.orig/configure.ac
-+++ open-vm-tools/configure.ac
-@@ -303,6 +303,7 @@ AC_ARG_ENABLE(
- [],
- [enable_resolutionkms="auto"])
-
-+AM_INIT_AUTOMAKE([subdir-objects])
- AM_INIT_AUTOMAKE
-
- ###