diff --git a/no-unused-const.patch b/no-unused-const.patch new file mode 100644 index 0000000..4f6562c --- /dev/null +++ b/no-unused-const.patch @@ -0,0 +1,14 @@ +Index: open-vm-tools/configure.ac +=================================================================== +--- open-vm-tools.orig/configure.ac ++++ open-vm-tools/configure.ac +@@ -988,7 +988,8 @@ CFLAGS="$CFLAGS -Werror" + # Glib2 keep changing mutex APIs so we also need to disable 'deprecated' + # warnings for now (-Wno-deprecated-declarations). + for TEST_CFLAG in -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing \ +- -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations; do ++ -Wno-unknown-pragmas -Wno-uninitialized -Wno-deprecated-declarations \ ++ -Wno-unused-const-variable; do + AC_MSG_CHECKING([for GCC flag $TEST_CFLAG]) + ORIGINAL_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $TEST_CFLAG" diff --git a/open-vm-tools-buildsystem-fixup.patch b/open-vm-tools-buildsystem-fixup.patch deleted file mode 100644 index d2937c5..0000000 --- a/open-vm-tools-buildsystem-fixup.patch +++ /dev/null @@ -1,77 +0,0 @@ -Index: open-vm-tools/services/plugins/dndcp/Makefile.am -=================================================================== ---- open-vm-tools.orig/services/plugins/dndcp/Makefile.am -+++ open-vm-tools/services/plugins/dndcp/Makefile.am -@@ -16,7 +16,7 @@ - ################################################################################ - - plugindir = @VMUSR_PLUGIN_INSTALLDIR@ --plugin_LTLIBRARIES = libdndcp.la -+plugin_LTLIBRARIES = libdndcpdnd.la libdndcpcp.la libdndcpbld.la libdndcp.la - - libdndcp_la_CPPFLAGS = - libdndcp_la_CPPFLAGS += @GTK_CPPFLAGS@ -@@ -31,21 +31,25 @@ libdndcp_la_CPPFLAGS += -I$(top_builddir - libdndcp_la_LDFLAGS = - libdndcp_la_LDFLAGS += @PLUGIN_LDFLAGS@ - --libdndcp_la_LIBADD = -+libdndcp_la_LIBADD = libdndcpdnd.la libdndcpcp.la libdndcpbld.la - libdndcp_la_LIBADD += @COMMON_XLIBS@ - libdndcp_la_LIBADD += @GTK_LIBS@ - libdndcp_la_LIBADD += @GTKMM_LIBS@ - libdndcp_la_LIBADD += @VMTOOLS_LIBS@ - libdndcp_la_LIBADD += @HGFS_LIBS@ - --libdndcp_la_SOURCES = -- --libdndcp_la_SOURCES += dnd/dndClipboard.c --libdndcp_la_SOURCES += dnd/dndCommon.c --libdndcp_la_SOURCES += dnd/dndCPMsgV4.c --libdndcp_la_SOURCES += dnd/dndLinux.c --libdndcp_la_SOURCES += dnd/dndMsg.c -+libdndcpcp_la_CPPFLAGS = -+libdndcpcp_la_CPPFLAGS += @GTK_CPPFLAGS@ -+libdndcpcp_la_CPPFLAGS += -I$(top_srcdir)/services/plugins/dndcp/dnd -+ -+libdndcpdnd_la_SOURCES = -+libdndcpdnd_la_SOURCES += dnd/dndClipboard.c -+libdndcpdnd_la_SOURCES += dnd/dndCommon.c -+libdndcpdnd_la_SOURCES += dnd/dndCPMsgV4.c -+libdndcpdnd_la_SOURCES += dnd/dndLinux.c -+libdndcpdnd_la_SOURCES += dnd/dndMsg.c - -+libdndcp_la_SOURCES = - libdndcp_la_SOURCES += dndGuest/copyPasteRpcV3.cc - libdndcp_la_SOURCES += dndGuest/dndFileList.cc - libdndcp_la_SOURCES += dndGuest/dndRpcV3.cc -@@ -67,8 +71,6 @@ libdndcp_la_SOURCES += dndGuest/dndCPTra - libdndcp_la_SOURCES += stringxx/string.cc - libdndcp_la_SOURCES += xutils/xutils.cc - --libdndcp_la_SOURCES += copyPasteCompat.c --libdndcp_la_SOURCES += copyPasteCompatX11.c - libdndcp_la_SOURCES += copyPasteDnDWrapper.cpp - libdndcp_la_SOURCES += copyPasteDnDX11.cpp - libdndcp_la_SOURCES += copyPasteUIX11.cpp -@@ -77,6 +79,10 @@ libdndcp_la_SOURCES += dndcp.cpp - libdndcp_la_SOURCES += dragDetWndX11.cpp - libdndcp_la_SOURCES += pointer.cpp - -+libdndcpcp_la_SOURCES = -+libdndcpcp_la_SOURCES += copyPasteCompat.c -+libdndcpcp_la_SOURCES += copyPasteCompatX11.c -+ - BUILT_SOURCES = - BUILT_SOURCES += cpFileContents.h - BUILT_SOURCES += cpFileContents_xdr.c -@@ -84,7 +90,8 @@ BUILT_SOURCES += cpFileContents_xdr.c - CLEANFILES = - CLEANFILES += $(BUILT_SOURCES) - --libdndcp_la_SOURCES += cpFileContents_xdr.c -+libdndcpbld_la_SOURCES = -+libdndcpbld_la_SOURCES += cpFileContents_xdr.c - - cpFileContents.h: cpFileContents.x - @RPCGEN_WRAPPER@ services/plugins/dndcp/cpFileContents.x $@ diff --git a/open-vm-tools-posixly.patch b/open-vm-tools-posixly.patch deleted file mode 100644 index d9fcadc..0000000 --- a/open-vm-tools-posixly.patch +++ /dev/null @@ -1,1061 +0,0 @@ -From 22c7decfae57ef51ab349203d1b23acb057849bc Mon Sep 17 00:00:00 2001 -From: Dominique Leuenberger -Date: Wed, 20 Apr 2016 10:36:05 +0200 -Subject: [PATCH] Linux: change to posix style - -replace it by defined(__linux__) ---- - open-vm-tools/hgfsmounter/hgfsmounter.c | 6 +++--- - open-vm-tools/lib/err/errPosix.c | 2 +- - open-vm-tools/lib/file/file.c | 2 +- - open-vm-tools/lib/file/fileLockPosix.c | 2 +- - open-vm-tools/lib/file/filePosix.c | 2 +- - open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 10 +++++----- - open-vm-tools/lib/include/netutil.h | 4 ++-- - open-vm-tools/lib/include/vm_product.h | 2 +- - open-vm-tools/lib/include/vmblock.h | 2 +- - open-vm-tools/lib/include/vmblock_user.h | 2 +- - open-vm-tools/lib/include/vmci_sockets.h | 10 +++++----- - open-vm-tools/lib/misc/hostinfoHV.c | 2 +- - open-vm-tools/lib/misc/hostname.c | 2 +- - open-vm-tools/lib/misc/idLinux.c | 6 +++--- - open-vm-tools/lib/misc/machineID.c | 2 +- - open-vm-tools/lib/misc/util_misc.c | 4 ++-- - open-vm-tools/lib/netUtil/netUtilLinux.c | 4 ++-- - open-vm-tools/lib/procMgr/procMgrPosix.c | 10 +++++----- - open-vm-tools/lib/rpcChannel/simpleSocket.c | 2 +- - open-vm-tools/lib/rpcIn/rpcin.c | 2 +- - open-vm-tools/lib/syncDriver/syncDriverInt.h | 2 +- - open-vm-tools/modules/linux/shared/kernelStubs.h | 2 +- - open-vm-tools/modules/linux/shared/vmciKernelAPI1.h | 6 +++--- - open-vm-tools/modules/linux/shared/vmci_kernel_if.h | 12 ++++++------ - open-vm-tools/modules/linux/vmci/common/vmciContext.c | 2 +- - open-vm-tools/modules/linux/vmci/common/vmciDriver.c | 2 +- - open-vm-tools/modules/linux/vmci/common/vmciEvent.c | 4 ++-- - open-vm-tools/modules/linux/vmci/linux/vmciKernelIf.c | 2 +- - open-vm-tools/modules/linux/vsock/linux/vsockAddr.c | 2 +- - .../modules/linux/vsock/linux/vsockSocketWrapper.h | 6 +++--- - open-vm-tools/modules/shared/vmblock/block.c | 2 +- - open-vm-tools/modules/shared/vmmemctl/kernelStubs.h | 2 +- - open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h | 2 +- - open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp | 2 +- - open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c | 6 +++--- - open-vm-tools/services/plugins/dndcp/dndUIX11.cpp | 6 +++--- - open-vm-tools/services/plugins/vix/foundryToolsDaemon.c | 16 ++++++++-------- - open-vm-tools/services/plugins/vix/vixPlugin.c | 2 +- - open-vm-tools/services/plugins/vix/vixPluginInt.h | 2 +- - open-vm-tools/services/plugins/vix/vixTools.c | 16 ++++++++-------- - open-vm-tools/tests/testVmblock/vmblocktest.c | 2 +- - open-vm-tools/toolbox/toolbox-cmd.c | 2 +- - open-vm-tools/toolbox/toolboxCmdInt.h | 2 +- - open-vm-tools/vgauth/lib/common.c | 4 ++-- - open-vm-tools/vmware-user-suid-wrapper/main.c | 2 +- - 45 files changed, 93 insertions(+), 93 deletions(-) - -diff --git a/open-vm-tools/hgfsmounter/hgfsmounter.c b/open-vm-tools/hgfsmounter/hgfsmounter.c -index 14a5c99..a6860da 100644 ---- a/open-vm-tools/hgfsmounter/hgfsmounter.c -+++ b/open-vm-tools/hgfsmounter/hgfsmounter.c -@@ -32,7 +32,7 @@ - #include - #include - #include --#if defined(linux) -+#if defined(__linux__) - # include - #endif - -@@ -103,7 +103,7 @@ - #include "hgfsmounter_version.h" - - /* XXX embed_version.h does not currently support Mach-O binaries (OS X). */ --#if defined(linux) || defined(__FreeBSD__) -+#if defined(__linux__) || defined(__FreeBSD__) - # include "vm_version.h" - # include "embed_version.h" - VM_EMBED_VERSION(HGFSMOUNTER_VERSION_STRING); -@@ -1187,7 +1187,7 @@ main(int argc, // IN - } - - /* Go! */ --#if defined(linux) -+#if defined(__linux__) - mntRes = mount(shareName, mountPoint, HGFS_NAME, flags, &mountInfo); - #elif defined(__FreeBSD__) - { -diff --git a/open-vm-tools/lib/err/errPosix.c b/open-vm-tools/lib/err/errPosix.c -index 5091f64..3bab011 100644 ---- a/open-vm-tools/lib/err/errPosix.c -+++ b/open-vm-tools/lib/err/errPosix.c -@@ -63,7 +63,7 @@ ErrErrno2String(Err_Number errorNumber, // IN - { - char *p; - --#if defined(linux) && !defined(N_PLAT_NLM) && !defined(__ANDROID__) -+#if defined(__linux__) && !defined(N_PLAT_NLM) && !defined(__ANDROID__) - p = strerror_r(errorNumber, buf, bufSize); - #else - p = strerror(errorNumber); -diff --git a/open-vm-tools/lib/file/file.c b/open-vm-tools/lib/file/file.c -index ba86bad..ebc17a2 100644 ---- a/open-vm-tools/lib/file/file.c -+++ b/open-vm-tools/lib/file/file.c -@@ -595,7 +595,7 @@ static Bool - OldMachineIDMatch(const char *first, // IN: - const char *second) // IN: - { --#if defined(__APPLE__) || defined(linux) -+#if defined(__APPLE__) || defined(__linux__) - /* Ignore the host name hash */ - char *p; - char *q; -diff --git a/open-vm-tools/lib/file/fileLockPosix.c b/open-vm-tools/lib/file/fileLockPosix.c -index 71689fa..ee7adaf 100644 ---- a/open-vm-tools/lib/file/fileLockPosix.c -+++ b/open-vm-tools/lib/file/fileLockPosix.c -@@ -599,7 +599,7 @@ FileLockAppendMessage(MsgList **msgs, // IN/OUT/OPT: - } - - --#if defined(linux) -+#if defined(__linux__) - /* - *---------------------------------------------------------------------- - * -diff --git a/open-vm-tools/lib/file/filePosix.c b/open-vm-tools/lib/file/filePosix.c -index c88e674..944a04e 100644 ---- a/open-vm-tools/lib/file/filePosix.c -+++ b/open-vm-tools/lib/file/filePosix.c -@@ -699,7 +699,7 @@ File_GetTimes(const char *pathName, // IN: - *accessTime = TimeUtil_UnixTimeToNtTime(statBuf.st_atimespec); - *writeTime = TimeUtil_UnixTimeToNtTime(statBuf.st_mtimespec); - *attrChangeTime = TimeUtil_UnixTimeToNtTime(statBuf.st_ctimespec); --#elif defined(linux) -+#elif defined(__linux__) - /* - * Linux: Glibc 2.3+ has st_Xtim. Glibc 2.1/2.2 has st_Xtime/__unusedX on - * same place (see below). We do not support Glibc 2.0 or older. -diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c -index b874ce9..cc0be4a 100644 ---- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c -+++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c -@@ -68,7 +68,7 @@ - #include "unicodeOperations.h" - #include "userlock.h" - --#if defined(linux) && !defined(SYS_getdents64) -+#if defined(__linux__) && !defined(SYS_getdents64) - /* For DT_UNKNOWN */ - # include - #endif -@@ -127,7 +127,7 @@ typedef struct DirectoryEntry { - * additional parameter which returns the position of the block read, which we don't care - * about. - */ --#if defined(linux) -+#if defined(__linux__) - static INLINE int - getdents_linux(unsigned int fd, - DirectoryEntry *dirp, -@@ -228,7 +228,7 @@ getdents_apple(DIR *fd, // IN - #endif - - --#if defined(sun) || defined(linux) || \ -+#if defined(sun) || defined(__linux__) || \ - (defined(__FreeBSD_version) && __FreeBSD_version < 490000) - /* - * Implements futimes(), which was introduced in glibc 2.3.3. FreeBSD 3.2 -@@ -1915,7 +1915,7 @@ HgfsGetCreationTime(const struct stat *stats) - # else - creationTime = HgfsConvertTimeSpecToNtTime(&stats->st_mtimespec); - # endif --#elif defined(linux) -+#elif defined(__linux__) - /* - * Linux: Glibc 2.3+ has st_Xtim. Glibc 2.1/2.2 has st_Xtime/__unusedX on - * same place (see below). We do not support Glibc 2.0 or older. -@@ -2516,7 +2516,7 @@ HgfsStatToFileAttr(struct stat *stats, // IN: stat information - attr->accessTime = HgfsConvertTimeSpecToNtTime(&stats->st_atimespec); - attr->writeTime = HgfsConvertTimeSpecToNtTime(&stats->st_mtimespec); - attr->attrChangeTime = HgfsConvertTimeSpecToNtTime(&stats->st_ctimespec); --#elif defined(linux) -+#elif defined(__linux__) - /* - * Linux: Glibc 2.3+ has st_Xtim. Glibc 2.1/2.2 has st_Xtime/__unusedX on - * same place (see below). We do not support Glibc 2.0 or older. -diff --git a/open-vm-tools/lib/include/netutil.h b/open-vm-tools/lib/include/netutil.h -index 7294053..cb38ebf 100644 ---- a/open-vm-tools/lib/include/netutil.h -+++ b/open-vm-tools/lib/include/netutil.h -@@ -97,7 +97,7 @@ const char *NetUtil_InetNToP(int af, const void *src, char *dst, - # define NetUtil_InetNToP inet_ntop - #endif - --#if defined(linux) -+#if defined(__linux__) - # ifdef DUMMY_NETUTIL - /* - * Dummy interface table to enable other tools'/libraries' unit tests. -@@ -121,7 +121,7 @@ EXTERN NetUtilIfTableEntry netUtilIfTable[]; - int NetUtil_GetIfIndex(const char *ifName); - char *NetUtil_GetIfName(int ifIndex); - # endif // ifdef DUMMY_NETUTIL --#endif // if defined(linux) -+#endif // if defined(__linux__) - - size_t NetUtil_GetHardwareAddress(int ifIndex, // IN - char *hwAddr, // OUT -diff --git a/open-vm-tools/lib/include/vm_product.h b/open-vm-tools/lib/include/vm_product.h -index a182275..64bece5 100644 ---- a/open-vm-tools/lib/include/vm_product.h -+++ b/open-vm-tools/lib/include/vm_product.h -@@ -502,7 +502,7 @@ - */ - #ifdef N_PLAT_NLM - # define PRODUCT_NAME_PLATFORM PRODUCT_NAME " for NetWare" --#elif defined(linux) -+#elif defined(__linux__) - # define PRODUCT_NAME_PLATFORM PRODUCT_NAME " for Linux" - #elif defined(_WIN32) - # define PRODUCT_NAME_PLATFORM PRODUCT_NAME " for Windows" -diff --git a/open-vm-tools/lib/include/vmblock.h b/open-vm-tools/lib/include/vmblock.h -index 8dbb0ce..541fd46 100644 ---- a/open-vm-tools/lib/include/vmblock.h -+++ b/open-vm-tools/lib/include/vmblock.h -@@ -145,7 +145,7 @@ - # define VMBLOCK_DEVICE_MODE VMBLOCK_FUSE_DEVICE_MODE - # define VMBLOCK_MOUNT_POINT VMBLOCK_FUSE_MOUNT_POINT - --#elif defined(linux) -+#elif defined(__linux__) - # define VMBLOCK_ADD_FILEBLOCK 98 - # define VMBLOCK_DEL_FILEBLOCK 99 - # ifdef VMX86_DEVEL -diff --git a/open-vm-tools/lib/include/vmblock_user.h b/open-vm-tools/lib/include/vmblock_user.h -index ea95116..55edd15 100644 ---- a/open-vm-tools/lib/include/vmblock_user.h -+++ b/open-vm-tools/lib/include/vmblock_user.h -@@ -117,7 +117,7 @@ VMBLOCK_CONTROL_FUSE(int fd, // IN - - #define VMBLOCK_CONTROL(fd, op, path) VMBLOCK_CONTROL_FUSE(fd, op, path) - --#elif defined(linux) -+#elif defined(__linux__) - - static INLINE int - VMBLOCK_CONTROL(int fd, int op, const char *path) -diff --git a/open-vm-tools/lib/include/vmci_sockets.h b/open-vm-tools/lib/include/vmci_sockets.h -index 72fe8c0..7763bac 100644 ---- a/open-vm-tools/lib/include/vmci_sockets.h -+++ b/open-vm-tools/lib/include/vmci_sockets.h -@@ -31,7 +31,7 @@ - # include - # endif // !NT_INCLUDED - #else // _WIN32 --#if defined(linux) && !defined(VMKERNEL) -+#if defined(__linux__) && !defined(VMKERNEL) - # if !defined(__KERNEL__) - # include - # endif // __KERNEL__ -@@ -489,8 +489,8 @@ struct uuid_2_cid { - } - # endif // !NT_INCLUDED - #else // _WIN32 --#if (defined(linux) && !defined(VMKERNEL)) || (defined(__APPLE__)) --# if defined(linux) && defined(__KERNEL__) -+#if (defined(__linux__) && !defined(VMKERNEL)) || (defined(__APPLE__)) -+# if defined(__linux__) && defined(__KERNEL__) - void VMCISock_KernelRegister(void); - void VMCISock_KernelDeregister(void); - int VMCISock_GetAFValue(void); -@@ -509,7 +509,7 @@ struct uuid_2_cid { - /** \cond PRIVATE */ - # define VMCI_SOCKETS_DEFAULT_DEVICE "/dev/vsock" - # define VMCI_SOCKETS_CLASSIC_ESX_DEVICE "/vmfs/devices/char/vsock/vsock" --# if defined(linux) -+# if defined(__linux__) - # define VMCI_SOCKETS_VERSION 1972 - # define VMCI_SOCKETS_GET_AF_VALUE 1976 - # define VMCI_SOCKETS_GET_LOCAL_CID 1977 -@@ -623,7 +623,7 @@ struct uuid_2_cid { - int fd; - int family = -1; - --#if defined(linux) -+#if defined(__linux__) - /* - * vSockets is now in mainline kernel with address family 40. As part - * of upstreaming, we removed the IOCTL we use below to determine the -diff --git a/open-vm-tools/lib/misc/hostinfoHV.c b/open-vm-tools/lib/misc/hostinfoHV.c -index 779ea9d..7d340d6 100644 ---- a/open-vm-tools/lib/misc/hostinfoHV.c -+++ b/open-vm-tools/lib/misc/hostinfoHV.c -@@ -120,7 +120,7 @@ Hostinfo_HypervisorCPUIDSig(void) - Bool - Hostinfo_TouchXen(void) - { --#if defined(linux) && (defined(__i386__) || defined(__x86_64__)) -+#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__)) - #define XEN_CPUID 0x40000000 - CPUIDRegs regs; - uint32 name[4]; -diff --git a/open-vm-tools/lib/misc/hostname.c b/open-vm-tools/lib/misc/hostname.c -index 06b2076..ccb2e83 100644 ---- a/open-vm-tools/lib/misc/hostname.c -+++ b/open-vm-tools/lib/misc/hostname.c -@@ -170,7 +170,7 @@ Hostinfo_HostName(void) - - return result; - } --#elif defined(linux) -+#elif defined(__linux__) - #include - #include - #include -diff --git a/open-vm-tools/lib/misc/idLinux.c b/open-vm-tools/lib/misc/idLinux.c -index 58bcb53..339b7f1 100644 ---- a/open-vm-tools/lib/misc/idLinux.c -+++ b/open-vm-tools/lib/misc/idLinux.c -@@ -121,7 +121,7 @@ Id_SetUid(uid_t euid) // IN: new euid - { - #if defined(__FreeBSD__) || defined(sun) - return setuid(euid); --#elif defined(linux) || defined __ANDROID__ -+#elif defined(__linux__) || defined __ANDROID__ - if (uid32) { - int r = syscall(SYS_setuid32, euid); - if (r != -1 || errno != ENOSYS) { -@@ -203,7 +203,7 @@ Id_SetRESUid(uid_t uid, // IN: new uid - { - #if (defined(__FreeBSD__) && __FreeBSD_version >= 500043) - return setresuid(uid, euid, suid); --#elif defined(linux) -+#elif defined(__linux__) - if (uid32) { - int r = syscall(SYS_setresuid32, uid, euid, suid); - -@@ -283,7 +283,7 @@ Id_SetRESGid(gid_t gid, // IN: new gid - { - #if (defined(__FreeBSD__) && __FreeBSD_version >= 500043) - return setresgid(gid, egid, sgid); --#elif defined(linux) -+#elif defined(__linux__) - if (uid32) { - int r = syscall(SYS_setresgid32, gid, egid, sgid); - -diff --git a/open-vm-tools/lib/misc/machineID.c b/open-vm-tools/lib/misc/machineID.c -index 1f60a80..05811de 100644 ---- a/open-vm-tools/lib/misc/machineID.c -+++ b/open-vm-tools/lib/misc/machineID.c -@@ -348,7 +348,7 @@ ObtainHardwareID(uint64 *hardwareID) // OUT: - - return 0; - } --#elif defined(linux) || defined __ANDROID__ -+#elif defined(__linux__) || defined __ANDROID__ - #include - #include - #include -diff --git a/open-vm-tools/lib/misc/util_misc.c b/open-vm-tools/lib/misc/util_misc.c -index 473cc8b..263d8db 100644 ---- a/open-vm-tools/lib/misc/util_misc.c -+++ b/open-vm-tools/lib/misc/util_misc.c -@@ -41,7 +41,7 @@ - #include - - #if !defined(_WIN32) --# if defined(linux) -+# if defined(__linux__) - # include // for SYS_gettid - # endif - # include -@@ -303,7 +303,7 @@ Util_CanonicalPathsIdentical(const char *path1, // IN: - ASSERT(path1); - ASSERT(path2); - --#if defined(linux) -+#if defined(__linux__) - return (strcmp(path1, path2) == 0); - #elif defined(_WIN32) - return (_stricmp(path1, path2) == 0); -diff --git a/open-vm-tools/lib/netUtil/netUtilLinux.c b/open-vm-tools/lib/netUtil/netUtilLinux.c -index 13fcc1e..d07f4e3 100644 ---- a/open-vm-tools/lib/netUtil/netUtilLinux.c -+++ b/open-vm-tools/lib/netUtil/netUtilLinux.c -@@ -276,7 +276,7 @@ abort: - } - - --#if defined(linux) -+#if defined(__linux__) - # ifdef DUMMY_NETUTIL - /* - *----------------------------------------------------------------------------- -@@ -406,4 +406,4 @@ NetUtil_GetHardwareAddress(int ifIndex, // IN - } - - --#endif // if defined(linux) -+#endif // if defined(__linux__) -diff --git a/open-vm-tools/lib/procMgr/procMgrPosix.c b/open-vm-tools/lib/procMgr/procMgrPosix.c -index d0e78a4..68ff43f 100644 ---- a/open-vm-tools/lib/procMgr/procMgrPosix.c -+++ b/open-vm-tools/lib/procMgr/procMgrPosix.c -@@ -47,7 +47,7 @@ - #include - #include - #include --#if defined(linux) || defined(__FreeBSD__) || defined(HAVE_SYS_USER_H) -+#if defined(__linux__) || defined(__FreeBSD__) || defined(HAVE_SYS_USER_H) - // sys/param.h is required on FreeBSD before sys/user.h - # include - // Pull in PAGE_SIZE/PAGE_SHIFT defines ahead of vm_basic_defs.h -@@ -137,7 +137,7 @@ static int ProcMgrGetCommandLineArgs(long pid, - #define BASH_PATH "/bin/bash" - #endif - --#if defined(linux) && !defined(GLIBC_VERSION_23) && !defined(__UCLIBC__) -+#if defined(__linux__) && !defined(GLIBC_VERSION_23) && !defined(__UCLIBC__) - /* - * Implements the system calls (they are not wrapped by glibc til 2.3.2). - * -@@ -194,7 +194,7 @@ setresgid(gid_t ruid, - *---------------------------------------------------------------------- - */ - --#if defined(linux) -+#if defined(__linux__) - int - ProcMgr_ReadProcFile(int fd, // IN - char **contents) // OUT -@@ -612,7 +612,7 @@ abort: - - return procList; - } --#endif // defined(linux) -+#endif // defined(__linux__) - - - /* -@@ -2033,7 +2033,7 @@ ProcMgr_Free(ProcMgr_AsyncProc *asyncProc) // IN - free(asyncProc); - } - --#if defined(linux) || defined(__FreeBSD__) || defined(__APPLE__) -+#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) - - /* - *---------------------------------------------------------------------- -diff --git a/open-vm-tools/lib/rpcChannel/simpleSocket.c b/open-vm-tools/lib/rpcChannel/simpleSocket.c -index 041b6f9..847c9f0 100644 ---- a/open-vm-tools/lib/rpcChannel/simpleSocket.c -+++ b/open-vm-tools/lib/rpcChannel/simpleSocket.c -@@ -24,7 +24,7 @@ - */ - - #include --#if defined(linux) -+#if defined(__linux__) - #include - #endif - -diff --git a/open-vm-tools/lib/rpcIn/rpcin.c b/open-vm-tools/lib/rpcIn/rpcin.c -index abe48e6..a371ad5 100644 ---- a/open-vm-tools/lib/rpcIn/rpcin.c -+++ b/open-vm-tools/lib/rpcIn/rpcin.c -@@ -62,7 +62,7 @@ - # include "vmci_defs.h" - #include "dataMap.h" - #include "vmware/guestrpc/tclodefs.h" --#if defined(linux) -+#if defined(__linux__) - #include - #else - #include -diff --git a/open-vm-tools/lib/syncDriver/syncDriverInt.h b/open-vm-tools/lib/syncDriver/syncDriverInt.h -index c9337c9..5a25e32 100644 ---- a/open-vm-tools/lib/syncDriver/syncDriverInt.h -+++ b/open-vm-tools/lib/syncDriver/syncDriverInt.h -@@ -45,7 +45,7 @@ typedef struct SyncHandle { - void (*close)(SyncDriverHandle handle); - } SyncHandle; - --#if defined(linux) -+#if defined(__linux__) - SyncDriverErr - LinuxDriver_Freeze(const char *userPaths, - SyncDriverHandle *handle); -diff --git a/open-vm-tools/modules/linux/shared/kernelStubs.h b/open-vm-tools/modules/linux/shared/kernelStubs.h -index c242fcc..75fdce1 100644 ---- a/open-vm-tools/modules/linux/shared/kernelStubs.h -+++ b/open-vm-tools/modules/linux/shared/kernelStubs.h -@@ -106,7 +106,7 @@ - * Function Prototypes - */ - --#if defined(linux) || defined(__APPLE__) || defined (sun) -+#if defined(__linux__) || defined(__APPLE__) || defined (sun) - - # ifdef linux /* if (linux) { */ - char *strdup(const char *source); -diff --git a/open-vm-tools/modules/linux/shared/vmciKernelAPI1.h b/open-vm-tools/modules/linux/shared/vmciKernelAPI1.h -index dc52818..d4f3953 100644 ---- a/open-vm-tools/modules/linux/shared/vmciKernelAPI1.h -+++ b/open-vm-tools/modules/linux/shared/vmciKernelAPI1.h -@@ -56,7 +56,7 @@ - - /* VMCI Device Usage API. */ - --#if defined(linux) && !defined(VMKERNEL) -+#if defined(__linux__) && !defined(VMKERNEL) - #define vmci_device_get(_a, _b, _c, _d) 1 - #define vmci_device_release(_x) - #else // !linux -@@ -89,7 +89,7 @@ int vmci_datagram_send(VMCIDatagram *msg); - - VMCIId vmci_get_context_id(void); - --#if defined(linux) && !defined(VMKERNEL) -+#if defined(__linux__) && !defined(VMKERNEL) - /* Returned value is a bool, 0 for false, 1 for true. */ - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) - int vmci_is_context_owner(VMCIId contextID, kuid_t uid); -@@ -111,7 +111,7 @@ typedef void (*VMCI_EventCB)(VMCIId subID, VMCI_EventData *ed, - void *clientData); - - int vmci_event_subscribe(VMCI_Event event, --#if !defined(linux) || defined(VMKERNEL) -+#if !defined(__linux__) || defined(VMKERNEL) - uint32 flags, - #endif // !linux || VMKERNEL - VMCI_EventCB callback, -diff --git a/open-vm-tools/modules/linux/shared/vmci_kernel_if.h b/open-vm-tools/modules/linux/shared/vmci_kernel_if.h -index 9def671..a65bca0 100644 ---- a/open-vm-tools/modules/linux/shared/vmci_kernel_if.h -+++ b/open-vm-tools/modules/linux/shared/vmci_kernel_if.h -@@ -27,7 +27,7 @@ - #ifndef _VMCI_KERNEL_IF_H_ - #define _VMCI_KERNEL_IF_H_ - --#if !defined(linux) && !defined(_WIN32) && !defined(__APPLE__) && \ -+#if !defined(__linux__) && !defined(_WIN32) && !defined(__APPLE__) && \ - !defined(VMKERNEL) - # error "Platform not supported." - #endif -@@ -36,7 +36,7 @@ - # include - #endif - --#if defined(linux) && !defined(VMKERNEL) -+#if defined(__linux__) && !defined(VMKERNEL) - # include "driver-config.h" - # include "compat_cred.h" - # include "compat_module.h" -@@ -79,7 +79,7 @@ - - #if defined(VMKERNEL) - # define VMCI_EXPORT_SYMBOL(_SYMBOL) VMK_MODULE_EXPORT_SYMBOL(_SYMBOL); --#elif defined(linux) -+#elif defined(__linux__) - # define VMCI_EXPORT_SYMBOL(_symbol) EXPORT_SYMBOL(_symbol); - #elif defined(__APPLE__) - # define VMCI_EXPORT_SYMBOL(_symbol) __attribute__((visibility("default"))) -@@ -95,7 +95,7 @@ - typedef World_ID VMCIHostVmID; - typedef uint32 VMCIHostUser; - typedef PPN *VMCIQPGuestMem; --#elif defined(linux) -+#elif defined(__linux__) - typedef spinlock_t VMCILock; - typedef unsigned long VMCILockFlags; - typedef wait_queue_head_t VMCIEvent; -@@ -194,7 +194,7 @@ typedef struct VMCIHost { - * First one is the active one and the second - * one is shadow world during FSR. - */ --#elif defined(linux) -+#elif defined(__linux__) - wait_queue_head_t waitQueue; - #elif defined(__APPLE__) - struct Socket *socket; /* vmci Socket object on Mac OS. */ -@@ -209,7 +209,7 @@ typedef struct VMCIHost { - * Guest device port I/O. - */ - --#if defined(linux) -+#if defined(__linux__) - typedef unsigned short int VMCIIoPort; - typedef int VMCIIoHandle; - #elif defined(_WIN32) -diff --git a/open-vm-tools/modules/linux/vmci/common/vmciContext.c b/open-vm-tools/modules/linux/vmci/common/vmciContext.c -index d2d0362..ea76a99 100644 ---- a/open-vm-tools/modules/linux/vmci/common/vmciContext.c -+++ b/open-vm-tools/modules/linux/vmci/common/vmciContext.c -@@ -2444,7 +2444,7 @@ vmci_cid_2_host_vm_id(VMCIId contextID, // IN - */ - - VMCI_EXPORT_SYMBOL(vmci_is_context_owner) --#if defined(linux) && !defined(VMKERNEL) -+#if defined(__linux__) && !defined(VMKERNEL) - int - vmci_is_context_owner(VMCIId contextID, // IN - VMCIHostUser uid) // IN -diff --git a/open-vm-tools/modules/linux/vmci/common/vmciDriver.c b/open-vm-tools/modules/linux/vmci/common/vmciDriver.c -index 4a37958..209769f 100644 ---- a/open-vm-tools/modules/linux/vmci/common/vmciDriver.c -+++ b/open-vm-tools/modules/linux/vmci/common/vmciDriver.c -@@ -254,7 +254,7 @@ VMCIUtil_Init(void) - * internal context id when needed. - */ - if (vmci_event_subscribe(VMCI_EVENT_CTX_ID_UPDATE, --#if !defined(linux) || defined(VMKERNEL) -+#if !defined(__linux__) || defined(VMKERNEL) - VMCI_FLAG_EVENT_NONE, - #endif // !linux || VMKERNEL - VMCIUtilCidUpdate, NULL, -diff --git a/open-vm-tools/modules/linux/vmci/common/vmciEvent.c b/open-vm-tools/modules/linux/vmci/common/vmciEvent.c -index ee781d0..f0a1efa 100644 ---- a/open-vm-tools/modules/linux/vmci/common/vmciEvent.c -+++ b/open-vm-tools/modules/linux/vmci/common/vmciEvent.c -@@ -717,7 +717,7 @@ VMCIEventUnregisterSubscription(VMCIId subID) // IN - VMCI_EXPORT_SYMBOL(vmci_event_subscribe) - int - vmci_event_subscribe(VMCI_Event event, // IN --#if !defined(linux) || defined(VMKERNEL) -+#if !defined(__linux__) || defined(VMKERNEL) - uint32 flags, // IN - #endif // !linux || VMKERNEL - VMCI_EventCB callback, // IN -@@ -725,7 +725,7 @@ vmci_event_subscribe(VMCI_Event event, // IN - VMCIId *subscriptionID) // OUT - { - int retval; --#if defined(linux) && !defined(VMKERNEL) -+#if defined(__linux__) && !defined(VMKERNEL) - uint32 flags = VMCI_FLAG_EVENT_NONE; - #endif // linux && !VMKERNEL - VMCISubscription *s = NULL; -diff --git a/open-vm-tools/modules/linux/vmci/linux/vmciKernelIf.c b/open-vm-tools/modules/linux/vmci/linux/vmciKernelIf.c -index 8b1788f..aed79a8 100644 ---- a/open-vm-tools/modules/linux/vmci/linux/vmciKernelIf.c -+++ b/open-vm-tools/modules/linux/vmci/linux/vmciKernelIf.c -@@ -27,7 +27,7 @@ - /* Must come before any kernel header file */ - #include "driver-config.h" - --#if !defined(linux) || defined(VMKERNEL) -+#if !defined(__linux__) || defined(VMKERNEL) - #error "Wrong platform." - #endif - -diff --git a/open-vm-tools/modules/linux/vsock/linux/vsockAddr.c b/open-vm-tools/modules/linux/vsock/linux/vsockAddr.c -index 728da27..4799e24 100644 ---- a/open-vm-tools/modules/linux/vsock/linux/vsockAddr.c -+++ b/open-vm-tools/modules/linux/vsock/linux/vsockAddr.c -@@ -26,7 +26,7 @@ - * These includes come before vsockCommon.h to ensure that VMware's ASSERT - * macro is used instead of Linux's irda.h definition. - */ --#if defined(linux) && !defined(VMKERNEL) -+#if defined(__linux__) && !defined(VMKERNEL) - # if defined(__KERNEL__) - # include "driver-config.h" - # include -diff --git a/open-vm-tools/modules/linux/vsock/linux/vsockSocketWrapper.h b/open-vm-tools/modules/linux/vsock/linux/vsockSocketWrapper.h -index acfa9fa..fb2e459 100644 ---- a/open-vm-tools/modules/linux/vsock/linux/vsockSocketWrapper.h -+++ b/open-vm-tools/modules/linux/vsock/linux/vsockSocketWrapper.h -@@ -216,7 +216,7 @@ - # define __ECONNINPROGRESS EINPROGRESS - # define __ESNDRCVTIMEDOUT EAGAIN - # define ESYSNOTREADY EOPNOTSUPP --#elif defined(linux) -+#elif defined(__linux__) - # define ESYSNOTREADY EOPNOTSUPP - # define __ELOCALSHUTDOWN EPIPE - # define __ELOCALRCVSHUTDOWN 0 -@@ -242,12 +242,12 @@ - # define closesocket(_s) close((_s)) - typedef int32 SOCKET; - #else --#if defined(linux) || defined(__APPLE__) -+#if defined(__linux__) || defined(__APPLE__) - # define SOCKET_ERROR (-1) - # define INVALID_SOCKET ((SOCKET) -1) - # define sockerr() errno - # define sockcleanup() do {} while (0) --#if defined(linux) -+#if defined(__linux__) - # define sockerr2err(_e) (((_e) > 0) ? -(_e) : (_e)) - # define closesocket(_s) close((_s)) - typedef int32 SOCKET; -diff --git a/open-vm-tools/modules/shared/vmblock/block.c b/open-vm-tools/modules/shared/vmblock/block.c -index d81a44d..1087eda 100644 ---- a/open-vm-tools/modules/shared/vmblock/block.c -+++ b/open-vm-tools/modules/shared/vmblock/block.c -@@ -65,7 +65,7 @@ - #include "os.h" - - #if defined(vmblock_fuse) --#elif defined(linux) -+#elif defined(__linux__) - # include "vmblockInt.h" - #elif defined(sun) - # include "module.h" -diff --git a/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h b/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h -index d0a53ad..aa64b17 100644 ---- a/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h -+++ b/open-vm-tools/modules/shared/vmmemctl/kernelStubs.h -@@ -145,7 +145,7 @@ - * Function Prototypes - */ - --#if defined(linux) || defined(__APPLE__) || defined (sun) -+#if defined(__linux__) || defined(__APPLE__) || defined (sun) - - # ifdef linux /* if (linux) { */ - char *strdup(const char *source); -diff --git a/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h b/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h -index 1f8fef0..c94dd91 100644 ---- a/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h -+++ b/open-vm-tools/modules/solaris/vmhgfs/kernelStubs.h -@@ -104,7 +104,7 @@ - * Function Prototypes - */ - --#if defined(linux) || defined(__APPLE__) || defined (sun) -+#if defined(__linux__) || defined(__APPLE__) || defined (sun) - - # ifdef linux /* if (linux) { */ - char *strdup(const char *source); -diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp -index 1762ac6..a09ae9d 100644 ---- a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp -+++ b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp -@@ -993,7 +993,7 @@ CopyPasteUIX11::LocalGetSelectionFileList(const Gtk::SelectionData& sd) // - while ((newPath = DnD_UriListGetNextFile(source.c_str(), - &index, - &newPathLen)) != NULL) { --#if defined(linux) -+#if defined(__linux__) - if (DnD_UriIsNonFileSchemes(newPath)) { - /* Try to get local file path for non file uri. */ - GFile *file = g_file_new_for_uri(newPath); -diff --git a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c -index 133219c..cec2b7d 100644 ---- a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c -+++ b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c -@@ -39,7 +39,7 @@ - #include "util.h" - #include "escape.h" - #include "su.h" --#if defined(linux) || defined(sun) || defined(__FreeBSD__) -+#if defined(__linux__) || defined(sun) || defined(__FreeBSD__) - #include "vmblock_user.h" - #include "mntinfo.h" - #endif -@@ -143,7 +143,7 @@ DnDUriListGetFile(char const *uriList, // IN : text/uri-list string - DND_URI_LIST_PRE_KDE, - sizeof DND_URI_LIST_PRE_KDE - 1) == 0) { - nameStart += sizeof DND_URI_LIST_PRE_KDE - 1; --#if defined(linux) -+#if defined(__linux__) - } else if (DnD_UriIsNonFileSchemes(nameStart)) { - /* Do nothing. */ - #endif -@@ -276,7 +276,7 @@ DnD_UriIsNonFileSchemes(const char *uri) - - - /* We need to make this suck less. */ --#if defined(linux) || defined(sun) || defined(__FreeBSD__) -+#if defined(__linux__) || defined(sun) || defined(__FreeBSD__) - - /* - *---------------------------------------------------------------------------- -diff --git a/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp b/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp -index 9798082..2391b13 100644 ---- a/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp -+++ b/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp -@@ -1393,7 +1393,7 @@ DnDUIX11::SetCPClipboardFromGtk(const Gtk::SelectionData& sd) // IN - while ((newPath = DnD_UriListGetNextFile(source.c_str(), - &index, - &newPathLen)) != NULL) { --#if defined(linux) -+#if defined(__linux__) - if (DnD_UriIsNonFileSchemes(newPath)) { - /* Try to get local file path for non file uri. */ - GFile *file = g_file_new_for_uri(newPath); -@@ -1424,7 +1424,7 @@ DnDUIX11::SetCPClipboardFromGtk(const Gtk::SelectionData& sd) // IN - g_debug("%s: Adding newPath '%s' newRelPath '%s'\n", __FUNCTION__, - newPath, newRelPath); - fileList.AddFile(newPath, newRelPath); --#if defined(linux) -+#if defined(__linux__) - char *newUri = HgfsUri_ConvertFromPathToHgfsUri(newPath, false); - fileList.AddFileUri(newUri); - free(newUri); -@@ -1439,7 +1439,7 @@ DnDUIX11::SetCPClipboardFromGtk(const Gtk::SelectionData& sd) // IN - DynBuf_GetSize(&buf)); - } - DynBuf_Destroy(&buf); --#if defined(linux) -+#if defined(__linux__) - if (fileList.ToUriClipboard(&buf)) { - CPClipboard_SetItem(&mClipboard, CPFORMAT_FILELIST_URI, DynBuf_Get(&buf), - DynBuf_GetSize(&buf)); -diff --git a/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c b/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c -index 317df95..87f9cf2 100644 ---- a/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c -+++ b/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c -@@ -27,7 +27,7 @@ - #include - #include - #include --#if defined(linux) -+#if defined(__linux__) - #include - #include - #include -@@ -79,7 +79,7 @@ - #include "codeset.h" - #include "vixToolsInt.h" - --#if defined(linux) -+#if defined(__linux__) - #include "hgfsDevLinux.h" - #endif - -@@ -92,7 +92,7 @@ - - #define MAX64_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ - --#if defined(linux) || defined(_WIN32) -+#if defined(__linux__) || defined(_WIN32) - - # if defined(_WIN32) - # define DECLARE_SYNCDRIVER_ERROR(name) DWORD name = ERROR_SUCCESS -@@ -119,7 +119,7 @@ gboolean ToolsDaemonTcloReceiveVixCommand(RpcInData *data); - static HgfsServerMgrData gFoundryHgfsBkdrConn; - gboolean ToolsDaemonHgfsImpersonated(RpcInData *data); - --#if defined(linux) || defined(_WIN32) -+#if defined(__linux__) || defined(_WIN32) - gboolean ToolsDaemonTcloSyncDriverFreeze(RpcInData *data); - - gboolean ToolsDaemonTcloSyncDriverThaw(RpcInData *data); -@@ -521,7 +521,7 @@ abort: - return err; - } - --#if defined(linux) || defined(_WIN32) -+#if defined(__linux__) || defined(_WIN32) - - /* - *----------------------------------------------------------------------------- -@@ -648,7 +648,7 @@ abort: - *----------------------------------------------------------------------------- - */ - --#if defined(linux) || defined(_WIN32) -+#if defined(__linux__) || defined(_WIN32) - static Bool - ToolsDaemonSyncDriverThawCallback(void *clientData) // IN (ignored) - { -@@ -686,7 +686,7 @@ exit: - *----------------------------------------------------------------------------- - */ - --#if defined(linux) || defined(_WIN32) -+#if defined(__linux__) || defined(_WIN32) - gboolean - ToolsDaemonTcloSyncDriverThaw(RpcInData *data) // IN - { -@@ -744,7 +744,7 @@ ToolsDaemonTcloMountHGFS(RpcInData *data) // IN - VixError err = VIX_OK; - static char resultBuffer[DEFAULT_RESULT_MSG_MAX_LENGTH]; - --#if defined(linux) -+#if defined(__linux__) - #define MOUNT_PATH_BIN "/bin/mount" - #define MOUNT_PATH_USR_BIN "/usr" MOUNT_PATH_BIN - #define MOUNT_HGFS_ARGS " -t vmhgfs .host:/ /mnt/hgfs" -diff --git a/open-vm-tools/services/plugins/vix/vixPlugin.c b/open-vm-tools/services/plugins/vix/vixPlugin.c -index 9448a65..226bf90 100644 ---- a/open-vm-tools/services/plugins/vix/vixPlugin.c -+++ b/open-vm-tools/services/plugins/vix/vixPlugin.c -@@ -137,7 +137,7 @@ ToolsOnLoad(ToolsAppCtx *ctx) - g_array_append_val(regs[reg].data, sysSigs[i]); - } - } --#if defined(_WIN32) || defined(linux) -+#if defined(_WIN32) || defined(__linux__) - else if (regs[reg].type == TOOLS_APP_GUESTRPC) { - /* - * If running the system daemon and if the sync driver is active, -diff --git a/open-vm-tools/services/plugins/vix/vixPluginInt.h b/open-vm-tools/services/plugins/vix/vixPluginInt.h -index 95e7a29..49e7105 100644 ---- a/open-vm-tools/services/plugins/vix/vixPluginInt.h -+++ b/open-vm-tools/services/plugins/vix/vixPluginInt.h -@@ -54,7 +54,7 @@ ToolsDaemonTcloReceiveVixCommand(RpcInData *data); - gboolean - FoundryToolsDaemonRunProgram(RpcInData *data); - --#if defined(linux) || defined(_WIN32) -+#if defined(__linux__) || defined(_WIN32) - gboolean - ToolsDaemonTcloSyncDriverFreeze(RpcInData *data); - -diff --git a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c -index 3b19554..42a4ac4 100644 ---- a/open-vm-tools/services/plugins/vix/vixTools.c -+++ b/open-vm-tools/services/plugins/vix/vixTools.c -@@ -109,7 +109,7 @@ - #include "su.h" - #include "escape.h" - --#if defined(linux) || defined(_WIN32) -+#if defined(__linux__) || defined(_WIN32) - #include "netutil.h" - #endif - -@@ -560,7 +560,7 @@ static VixError VixToolsProcessHgfsPacket(VixCommandHgfsSendPacket *requestMsg, - static VixError VixToolsListFileSystems(VixCommandRequestHeader *requestMsg, - char **result); - --#if defined(_WIN32) || defined(linux) -+#if defined(_WIN32) || defined(__linux__) - static VixError VixToolsPrintFileSystemInfo(char **destPtr, - const char *endDestPtr, - const char *name, -@@ -1658,7 +1658,7 @@ VixToolsStartProgramImpl(const char *requestName, // IN - * For non-Windows, we use the user's $HOME if workingDir isn't supplied. - */ - if (NULL == workingDir) { --#if defined(linux) || defined(sun) || defined(__FreeBSD__) || defined(__APPLE__) -+#if defined(__linux__) || defined(sun) || defined(__FreeBSD__) || defined(__APPLE__) - char *username = NULL; - - if (!ProcMgr_GetImpersonatedUserInfo(&username, &workingDirectory)) { -@@ -6479,7 +6479,7 @@ VixToolsGetFileExtendedInfoLength(const char *filePathName, // IN - fileExtendedInfoBufferSize += 10 * 3; // uid, gid, perms - #endif - --#if defined(linux) || defined(sun) || defined(__FreeBSD__) -+#if defined(__linux__) || defined(sun) || defined(__FreeBSD__) - if (File_IsSymLink(filePathName)) { - char *symlinkTarget; - symlinkTarget = Posix_ReadLink(filePathName); -@@ -8484,7 +8484,7 @@ VixToolsListFileSystems(VixCommandRequestHeader *requestMsg, // IN - char *destPtr; - char *endDestPtr; - Bool escapeStrs; --#if defined(_WIN32) || defined(linux) -+#if defined(_WIN32) || defined(__linux__) - Bool truncated; - #endif - #if defined(_WIN32) -@@ -8566,7 +8566,7 @@ VixToolsListFileSystems(VixCommandRequestHeader *requestMsg, // IN - free(fileSystemType); - } - --#elif defined(linux) -+#elif defined(__linux__) - - mountfile = "/etc/mtab"; - -@@ -8626,7 +8626,7 @@ abort: - } // VixToolsListFileSystems - - --#if defined(_WIN32) || defined(linux) -+#if defined(_WIN32) || defined(__linux__) - /* - *----------------------------------------------------------------------------- - * -@@ -8704,7 +8704,7 @@ abort: - - return err; - } --#endif // #if defined(_WIN32) || defined(linux) -+#endif // #if defined(_WIN32) || defined(__linux__) - - - /* -diff --git a/open-vm-tools/tests/testVmblock/vmblocktest.c b/open-vm-tools/tests/testVmblock/vmblocktest.c -index 2763680..34027e0 100644 ---- a/open-vm-tools/tests/testVmblock/vmblocktest.c -+++ b/open-vm-tools/tests/testVmblock/vmblocktest.c -@@ -24,7 +24,7 @@ - * - */ - --#if !defined(linux) && !defined(sun) && !defined(__FreeBSD__) && !defined(vmblock_fuse) -+#if !defined(__linux__) && !defined(sun) && !defined(__FreeBSD__) && !defined(vmblock_fuse) - # error "vmblocktest.c needs to be ported to your OS." - #endif - -diff --git a/open-vm-tools/toolbox/toolbox-cmd.c b/open-vm-tools/toolbox/toolbox-cmd.c -index e8b50ed..aa641e5 100644 ---- a/open-vm-tools/toolbox/toolbox-cmd.c -+++ b/open-vm-tools/toolbox/toolbox-cmd.c -@@ -103,7 +103,7 @@ static CmdTable commands[] = { - { "disk", Disk_Command, TRUE, TRUE, Disk_Help}, - { "stat", Stat_Command, TRUE, FALSE, Stat_Help}, - { "device", Device_Command, TRUE, FALSE, Device_Help}, --#if (defined(_WIN32) || defined(linux)) && !defined(OPEN_VM_TOOLS) -+#if (defined(_WIN32) || defined(__linux__)) && !defined(OPEN_VM_TOOLS) - { "upgrade", Upgrade_Command, TRUE, TRUE, Upgrade_Help}, - #endif - { "logging", Logging_Command, TRUE, TRUE, Logging_Help}, -diff --git a/open-vm-tools/toolbox/toolboxCmdInt.h b/open-vm-tools/toolbox/toolboxCmdInt.h -index d52d9e0..c7794f8 100644 ---- a/open-vm-tools/toolbox/toolboxCmdInt.h -+++ b/open-vm-tools/toolbox/toolboxCmdInt.h -@@ -129,7 +129,7 @@ DECLARE_COMMAND(Stat); - DECLARE_COMMAND(TimeSync); - DECLARE_COMMAND(Logging); - --#if defined(_WIN32) || (defined(linux) && !defined(OPEN_VM_TOOLS)) -+#if defined(_WIN32) || (defined(__linux__) && !defined(OPEN_VM_TOOLS)) - DECLARE_COMMAND(Upgrade); - #endif - -diff --git a/open-vm-tools/vgauth/lib/common.c b/open-vm-tools/vgauth/lib/common.c -index 15ef92e..43442e8 100644 ---- a/open-vm-tools/vgauth/lib/common.c -+++ b/open-vm-tools/vgauth/lib/common.c -@@ -302,7 +302,7 @@ VGAuth_InstallClient(VGAuthContext *ctx, - - #ifdef _WIN32 - return VGAUTH_E_OK; --#elif defined(linux) -+#elif defined(__linux__) - { - gchar *fileName; - gchar *lowAppName; -@@ -425,7 +425,7 @@ VGAuth_UninstallClient(VGAuthContext *ctx, - - #ifdef _WIN32 - return VGAUTH_E_OK; --#elif defined(linux) -+#elif defined(__linux__) - { - gchar *fileName; - gchar *lowAppName; -diff --git a/open-vm-tools/vmware-user-suid-wrapper/main.c b/open-vm-tools/vmware-user-suid-wrapper/main.c -index c2d75cf..9cfaffa 100644 ---- a/open-vm-tools/vmware-user-suid-wrapper/main.c -+++ b/open-vm-tools/vmware-user-suid-wrapper/main.c -@@ -28,7 +28,7 @@ - * remove blocks in the blocking file system. - */ - --#if !defined(sun) && !defined(__FreeBSD__) && !defined(linux) -+#if !defined(sun) && !defined(__FreeBSD__) && !defined(__linux__) - # error This program is not supported on your platform. - #endif - --- -2.8.1 - diff --git a/open-vm-tools-stable-10.0.7-gtk3.tar.gz b/open-vm-tools-stable-10.0.7-gtk3.tar.gz new file mode 100644 index 0000000..07e621b --- /dev/null +++ b/open-vm-tools-stable-10.0.7-gtk3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:820c9aa3cc1dc2c4f8ce16f2d641a408e018762c14b27219d384d98b8f3fdb78 +size 2907517 diff --git a/open-vm-tools-stable-10.0.7.tar.gz b/open-vm-tools-stable-10.0.7.tar.gz deleted file mode 100644 index a4db33e..0000000 --- a/open-vm-tools-stable-10.0.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87d76dc3affd39dccfae80c7210ac89e8f14cb493a651709780f67b1b5a92ec8 -size 3038018 diff --git a/open-vm-tools.changes b/open-vm-tools.changes index 4d73dc8..cef38c4 100644 --- a/open-vm-tools.changes +++ b/open-vm-tools.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Thu Jun 16 17:45:54 UTC 2016 - ken@suse.com + +- Added patches for GCC 6 build failure (boo#985110) + + vmw-bitmask-gcc6.patch + + no-unused-const.patch + +------------------------------------------------------------------- +Wed Jun 8 23:30:34 UTC 2016 - ken@suse.com + +- Update to 10.0.7-gtk3 stable branch + + add support for gtk3, needed by the dndcp and resolutionset + plugins + + remove files generated by autoreconf + + a few minor build fixes +- Update fixes copy-n-paste and drag-n-drop regressions (bsc#978424) +- Added new vmblock-fuse.service +- Drop upstream patches included (or not necessary) in 10.0.7-gtk3: + + open-vm-tools-posixly.patch + + open-vm-tools-buildsystem-fixup.patch + ------------------------------------------------------------------- Fri Apr 29 17:32:37 UTC 2016 - afaerber@suse.de @@ -185,6 +206,7 @@ Wed May 18 00:01:07 UTC 2015 - mlatimer@suse.com - Disable ssl for older versions of SLES and openSUSE (disables grabbitmqproxy and vgauth). - Update spec file to be compatible with SLES and openSUSE. +- This update also addresses a suspend with systemd issue (bsc#913727) ------------------------------------------------------------------- Tue May 5 14:31:19 UTC 2015 - dimstar@opensuse.org diff --git a/open-vm-tools.spec b/open-vm-tools.spec index ff95ec2..d7e4d67 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -39,6 +39,33 @@ %endif %endif +# vmblock-fuse.service requires systemd >= 228 which is in openSUSE Factory, SLES12SP2 and Leap 42.2 (see bsc#985773) +%if 0%{?is_opensuse} +%if 0%{?suse_version} >= 1315 +%if 0%{?suse_version} != 1320 +%if 0%{?sle_version} != 120100 +%bcond_without vmblockfuseservice +%else +%bcond_with vmblockfuseservice +%endif +%else +%bcond_with vmblockfuseservice +%endif +%else +%bcond_with vmblockfuseservice +%endif +%else # !opensuse +%if 0%{?suse_version} >= 1315 +%if 0%{?sle_version} > 120100 +%bcond_without vmblockfuseservice +%else +%bcond_with vmblockfuseservice +%endif +%else +%bcond_with vmblockfuseservice +%endif +%endif + # exclude AMD PCnet32 LANCE pci.id from Supplements list [bnc#397554] %define __find_supplements sh -c '/usr/lib/rpm/find-supplements %{name} | grep -v pci:v00001022d00002000' @@ -76,7 +103,7 @@ Summary: Open Virtual Machine Tools License: BSD-3-Clause and GPL-2.0 and LGPL-2.1 Group: System/Emulators/PC Url: https://github.com/vmware/open-vm-tools -Source: https://github.com/vmware/open-vm-tools/archive/stable-%{version}.tar.gz#/%{tarname}-%{version}.tar.gz +Source: %{tarname}-%{version}-gtk3.tar.gz Source1: vmtoolsd Source2: vmtoolsd.service Source3: vmware-user-autostart.desktop @@ -84,12 +111,18 @@ Source5: vmware-user-autostart-wrapper Source6: open-vm-tools-modprobe.conf Source7: tools.conf Source8: vgauthd.service +Source9: vmblock-fuse.service Source98: preamble BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++ # don't use pkgconfig(gtk+-2.0) so we can build on SLE +%if 0%{?suse_version} >= 1310 +BuildRequires: gtk3-devel +BuildRequires: gtkmm3-devel +%else BuildRequires: gtk2-devel BuildRequires: gtkmm2-devel +%endif # Only require kernel packages if kernel modules are being built %if %{KMP} BuildRequires: kernel-source @@ -137,8 +170,8 @@ Requires(pre): %fillup_prereq Requires(pre): %insserv_prereq ExclusiveArch: %ix86 x86_64 Patch0: enable-gcc46+.patch -Patch1: open-vm-tools-posixly.patch -Patch2: open-vm-tools-buildsystem-fixup.patch +Patch1: vmw-bitmask-gcc6.patch +Patch2: no-unused-const.patch %if %{KMP} %suse_kernel_module_package -n vmware-guest -p %{SOURCE98} xen um @@ -235,11 +268,11 @@ Those are the development headers for libvmtools. They are needed if you intend to create own plugins for vmtoolsd. %prep -%setup -q -n %{tarname}-%{version}/%{subname} +%setup -q -n %{tarname}-%{version}-gtk3/%{subname} # fix for an rpmlint warning regarding wrong line feeds sed -i -e "s/\r//" README %patch0 -p1 -%patch1 -p2 +%patch1 -p1 %patch2 -p1 %build @@ -280,8 +313,8 @@ chmod 755 configure --without-x \ %endif --disable-dependency-tracking \ -%if ! 0%{?is_opensuse} && 0%{?suse_version} == 1315 - --without-gtkmm \ +%if 0%{?suse_version} >= 1310 + --with-gtk3 \ %endif %if ! %{with vgauth} --without-xmlsecurity \ @@ -356,6 +389,10 @@ mv %{buildroot}%{_sysconfdir}/vmware-tools/vm-support %{buildroot}%{_bindir} %if %{with systemd} install -p -m 644 -D %{SOURCE2} %{buildroot}%{_unitdir}/vmtoolsd.service ln -sf service %{buildroot}%{_sbindir}/rcvmtoolsd +%if %{with vmblockfuseservice} +install -p -m 644 -D %{SOURCE9} %{buildroot}%{_unitdir}/vmblock-fuse.service +ln -sf service %{buildroot}%{_sbindir}/rcvmblock-fuse +%endif %if %{with vgauth} install -p -m 644 -D %{SOURCE8} %{buildroot}%{_unitdir}/vgauthd.service ln -sf service %{buildroot}%{_sbindir}/rcvgauthd @@ -425,12 +462,32 @@ install -D -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/modprobe.d/50-vmnics.co %verifyscript desktop %verify_permissions -e /usr/bin/vmware-user-suid-wrapper +%pre desktop +%if %{with vmblockfuseservice} +%service_add_pre vmblock-fuse.service +%endif + %post desktop %if 0%{?suse_version} <= 1130 %run_permissions %else %set_permissions /usr/bin/vmware-user-suid-wrapper %endif +%if %{with vmblockfuseservice} +%service_add_post vmblock-fuse.service +%endif +/sbin/ldconfig + +%preun desktop +%if %{with vmblockfuseservice} +%service_del_preun vmblock-fuse.service +%endif + +%postun desktop +%if %{with vmblockfuseservice} +%service_del_postun vmblock-fuse.service +%endif +/sbin/ldconfig %endif @@ -554,6 +611,11 @@ rm -rf %{buildroot} %{_libdir}/%{name}/plugins/vmusr/ %{_bindir}/vmware-user-autostart-wrapper %{_bindir}/vmware-vmblock-fuse +%if %{with vmblockfuseservice} +%{_unitdir}/vmblock-fuse.service +%{_sbindir}/rcvmblock-fuse +%endif + %endif %files -n libvmtools0 diff --git a/vgauthd.service b/vgauthd.service index 8e704a0..f57c6b0 100644 --- a/vgauthd.service +++ b/vgauthd.service @@ -1,5 +1,5 @@ [Unit] -Description=VGAuth Service for open-vm-tools +Description=open-vm-tools: vgauth service for virtual machines hosted on VMware Documentation=http://github.com/vmware/open-vm-tools ConditionVirtualization=vmware PartOf=vmtoolsd.service diff --git a/vmblock-fuse.service b/vmblock-fuse.service new file mode 100644 index 0000000..9387fe3 --- /dev/null +++ b/vmblock-fuse.service @@ -0,0 +1,14 @@ +[Unit] +Description=open-vm-tools: vmblock-fuse service for virtual machines hosted on VMware +Documentation=https://github.com/vmware/open-vm-tools/blob/master/open-vm-tools/vmblock-fuse/design.txt +ConditionVirtualization=vmware +Before=vmtoolsd.service + +[Service] +Type=forking +RuntimeDirectory=vmblock-fuse +RuntimeDirectoryMode=755 +ExecStart=/usr/bin/vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse + +[Install] +WantedBy=multi-user.target diff --git a/vmtoolsd.service b/vmtoolsd.service index c0a9412..2fdcd16 100644 --- a/vmtoolsd.service +++ b/vmtoolsd.service @@ -1,12 +1,14 @@ [Unit] -Description=Service for virtual machines hosted on VMware +Description=open-vm-tools: vmtoolsd service for virtual machines hosted on VMware Documentation=http://github.com/vmware/open-vm-tools ConditionVirtualization=vmware Requires=vgauthd.service After=vgauthd.service [Service] -ExecStart=/usr/bin/vmtoolsd +Type=forking +PIDFile=/var/run/vmtoolsd.pid +ExecStart=/usr/bin/vmtoolsd --background /var/run/vmtoolsd.pid TimeoutStopSec=5 [Install] diff --git a/vmw-bitmask-gcc6.patch b/vmw-bitmask-gcc6.patch new file mode 100644 index 0000000..614c7a4 --- /dev/null +++ b/vmw-bitmask-gcc6.patch @@ -0,0 +1,17 @@ +Index: open-vm-tools/lib/include/x86cpuid.h +=================================================================== +--- open-vm-tools.orig/lib/include/x86cpuid.h ++++ open-vm-tools/lib/include/x86cpuid.h +@@ -905,11 +905,8 @@ FIELD(81E, 0, ECX, 8, 3, NODES_PER_PK + * + * e.g. - CPUID_VIRT_BITS_MASK = 0xff00 + * - CPUID_VIRT_BITS_SHIFT = 8 +- * +- * Note: The MASK definitions must use some gymnastics to get +- * around a warning when shifting left by 32. + */ +-#define VMW_BIT_MASK(shift) (((1 << (shift - 1)) << 1) - 1) ++#define VMW_BIT_MASK(shift) (0xffffffffu >> (32 - shift)) + + #define FIELD(lvl, ecxIn, reg, bitpos, size, name, s, c3) \ + CPUID_##name##_SHIFT = bitpos, \