Index: head/emulators/open-vm-tools/Makefile
===================================================================
--- head/emulators/open-vm-tools/Makefile	(revision 471013)
+++ head/emulators/open-vm-tools/Makefile	(revision 471014)
@@ -1,100 +1,95 @@
 # Created by: mbr@FreeBSD.org
 # $FreeBSD$
 
 PORTNAME=		open-vm-tools
 PORTVERSION=		${RELEASE_VER}
 DISTVERSIONPREFIX=	stable-
-PORTREVISION=		6
 PORTEPOCH=		2
 CATEGORIES=		emulators
 
 MAINTAINER=		jpaetzel@FreeBSD.org
 COMMENT?=		Open VMware tools for FreeBSD VMware guests
 
 LICENSE=		LGPL21
 LICENSE_FILE=		${WRKSRC}/COPYING
 
 ONLY_FOR_ARCHS=		amd64 i386
 
 LIB_DEPENDS=		libmspack.so:archivers/libmspack
 
-RELEASE_VER=		10.2.0
-BUILD_VER=		7253323
+RELEASE_VER=		10.2.5
+BUILD_VER=		8068406
 
 OPTIONS_DEFINE=		DNET LIBNOTIFY OPENSSL X11
 OPTIONS_DEFAULT=	DNET LIBNOTIFY OPENSSL X11
 
 OPTIONS_SUB=
 
 DNET_DESC=		libdnet support
 LIBNOTIFY_DESC=		Desktop notification support
 
 X11_CONFIGURE_WITH=	x gtk2 gtkmm
 X11_USE=		xorg=ice,sm,x11,xext,xi,xinerama,xineramaproto,xrandr,xrender,xtst \
 			gnome=gdkpixbuf2,gtk20,gtkmm24
 X11_LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 			libfreetype.so:print/freetype2
 LIBNOTIFY_LIB_DEPENDS=	libnotify.so:devel/libnotify
 DNET_CONFIGURE_WITH=	dnet
 DNET_LIB_DEPENDS=	libdnet.so:net/libdnet
 OPENSSL_CONFIGURE_WITH=	ssl
 
 WRKSRC_SUBDIR=		open-vm-tools
 
 GNU_CONFIGURE=		yes
 USES=			autoreconf fuse gettext-runtime kmod libtool localbase pathfix pkgconfig
 USE_GNOME=		glib20
 
 USE_GITHUB=		yes
 GH_ACCOUNT=		vmware
 
 USE_LDCONFIG=		yes
 CPPFLAGS+=		-Wno-deprecated-declarations
 
 SSP_UNSAFE=		kernel module does not support ssp
 
 CONFIGURE_ARGS+=	--without-icu \
 			--disable-vgauth \
 			--sysconfdir=${PREFIX}/etc
 
 CONFLICTS+=		vmware-guestd[0-9]* vmware-tools[0-9]*
 
 USE_RC_SUBR=		vmware-guestd vmware-kmod
 
 INSTALL_TARGET=		install-strip
 
 .include <bsd.port.options.mk>
-
-.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1200063
-EXTRA_PATCHES=	${PATCHDIR}/extra-patch-modules_freebsd_vmxnet_net__compat.h
-.endif
 
 .if ${PORT_OPTIONS:MX11}
 CONFLICTS=		open-vm-tools-nox11-[0-9]*
 .else
 CONFLICTS=		open-vm-tools-[0-9]*
 .endif
 
 CONFIGURE_ENV+=		SYSDIR=${SRC_BASE}/sys
 
 .include <bsd.port.pre.mk>
 
 post-patch:
 	@${REINPLACE_CMD} -e "s@%%PREFIX%%@${PREFIX}@"\
 		${WRKSRC}/lib/guestApp/guestApp.c
 
 post-build:
 	cd ${WRKSRC}/modules && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS}
 
 post-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers
 	${MKDIR} ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/input
 	${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmblock.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmblock.ko
 	${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmmemctl.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmmemctl.ko
 	${INSTALL_DATA} ${WRKSRC}/modules/freebsd/vmxnet.ko ${STAGEDIR}${PREFIX}/lib/vmware-tools/modules/drivers/vmxnet.ko
 	${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/vmware/
 	${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/scripts/
 	${MKDIR} ${STAGEDIR}${PREFIX}/share/open-vm-tools/tests/
 	${MKDIR} ${STAGEDIR}${PREFIX}/etc/rc.conf.d
 
 .include <bsd.port.post.mk>
Index: head/emulators/open-vm-tools/distinfo
===================================================================
--- head/emulators/open-vm-tools/distinfo	(revision 471013)
+++ head/emulators/open-vm-tools/distinfo	(revision 471014)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1513787562
-SHA256 (vmware-open-vm-tools-stable-10.2.0_GH0.tar.gz) = 40dccff0630034b4985ac7a0d3bfcf89025e9a57f518e561db8c6fd7322bf029
-SIZE (vmware-open-vm-tools-stable-10.2.0_GH0.tar.gz) = 3200084
+TIMESTAMP = 1524018090
+SHA256 (vmware-open-vm-tools-stable-10.2.5_GH0.tar.gz) = c0f182c0c422fca8f8b3e5c21802f724256dfe5907383db28ec7e4d5b6d52b0f
+SIZE (vmware-open-vm-tools-stable-10.2.5_GH0.tar.gz) = 3207633
Index: head/emulators/open-vm-tools/files/patch-lib_wiper_wiperPosix.c
===================================================================
--- head/emulators/open-vm-tools/files/patch-lib_wiper_wiperPosix.c	(revision 471013)
+++ head/emulators/open-vm-tools/files/patch-lib_wiper_wiperPosix.c	(nonexistent)
@@ -1,10 +0,0 @@
---- lib/wiper/wiperPosix.c.orig	2018-02-24 17:51:48 UTC
-+++ lib/wiper/wiperPosix.c
-@@ -143,6 +143,7 @@ static const PartitionInfo gKnownPartitions[] = {
-    { "ntfs",      PARTITION_NTFS,         NULL,                   TRUE        },
-    { "pcfs",      PARTITION_PCFS,         NULL,                   TRUE        },
-    { "reiserfs",  PARTITION_REISERFS,     NULL,                   TRUE        },
-+   { "ufs",       PARTITION_UFS,          NULL,                   TRUE        },
-    { "vfat",      PARTITION_FAT,          NULL,                   TRUE        },
-    { "zfs",       PARTITION_ZFS,          NULL,                   FALSE       },
-    { "xfs",       PARTITION_XFS,          NULL,                   TRUE        },

Property changes on: head/emulators/open-vm-tools/files/patch-lib_wiper_wiperPosix.c
___________________________________________________________________
Deleted: fbsd:nokeywords
## -1 +0,0 ##
-yes
\ No newline at end of property
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: head/emulators/open-vm-tools/files/extra-patch-modules_freebsd_vmxnet_net__compat.h
===================================================================
--- head/emulators/open-vm-tools/files/extra-patch-modules_freebsd_vmxnet_net__compat.h	(revision 471013)
+++ head/emulators/open-vm-tools/files/extra-patch-modules_freebsd_vmxnet_net__compat.h	(nonexistent)
@@ -1,13 +0,0 @@
---- modules/freebsd/vmxnet/net_compat.h.orig	2018-05-23 22:11:09 UTC
-+++ modules/freebsd/vmxnet/net_compat.h
-@@ -38,8 +38,8 @@
-    #define VXN_IFMULTI_FIRST LIST_FIRST
-    #define VXN_IFMULTI_NEXT  LIST_NEXT
- #else /* >= 500016 */
--   #define VXN_IFMULTI_FIRST TAILQ_FIRST
--   #define VXN_IFMULTI_NEXT  TAILQ_NEXT
-+   #define VXN_IFMULTI_FIRST CK_STAILQ_FIRST
-+   #define VXN_IFMULTI_NEXT  CK_STAILQ_NEXT
- #endif /* 500016 */
- 
- #if __FreeBSD_version < 500043

Property changes on: head/emulators/open-vm-tools/files/extra-patch-modules_freebsd_vmxnet_net__compat.h
___________________________________________________________________
Deleted: fbsd:nokeywords
## -1 +0,0 ##
-yes
\ No newline at end of property
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:mime-type
## -1 +0,0 ##
-text/plain
\ No newline at end of property
Index: head/emulators/open-vm-tools/files/patch-configure.ac
===================================================================
--- head/emulators/open-vm-tools/files/patch-configure.ac	(revision 471013)
+++ head/emulators/open-vm-tools/files/patch-configure.ac	(revision 471014)
@@ -1,20 +1,20 @@
---- configure.ac.orig	2017-02-24 22:15:37 UTC
+--- configure.ac.orig	2018-03-30 18:44:35 UTC
 +++ configure.ac
-@@ -1082,7 +1082,7 @@ AC_CHECK_HEADERS([sys/user.h],
+@@ -1095,7 +1095,7 @@ AC_CHECK_HEADERS([sys/user.h],
     ])
  AC_CHECK_HEADERS([sys/vfs.h])
  AC_CHECK_HEADERS([syslimits.h])
 -AC_CHECK_HEADERS([unwind.h])
 +#AC_CHECK_HEADERS([unwind.h])
  
  AC_CHECK_HEADER(
     [wchar.h],
-@@ -1137,7 +1137,7 @@ AC_C_VOLATILE
+@@ -1142,7 +1142,7 @@ AC_C_VOLATILE
  
  ### General flags / actions
  CFLAGS="$CFLAGS -Wall"
 -CFLAGS="$CFLAGS -Werror"
 +CFLAGS="$CFLAGS -Werror -Wno-unused-function -Wno-address-of-packed-member -Wno-unknown-warning-option"
  
  # -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident'
  # in Xlib.h on OpenSolaris.
Index: head/emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c
===================================================================
--- head/emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c	(revision 471013)
+++ head/emulators/open-vm-tools/files/patch-lib_guestApp_guestApp.c	(revision 471014)
@@ -1,11 +1,11 @@
---- lib/guestApp/guestApp.c.orig	2017-02-24 22:15:37 UTC
+--- lib/guestApp/guestApp.c.orig	2018-03-30 18:44:35 UTC
 +++ lib/guestApp/guestApp.c
 @@ -63,7 +63,7 @@
  #elif defined __APPLE__
  #   define GUESTAPP_TOOLS_INSTALL_PATH "/Library/Application Support/VMware Tools"
  #else
 -#   define GUESTAPP_TOOLS_INSTALL_PATH "/etc/vmware-tools"
 +#   define GUESTAPP_TOOLS_INSTALL_PATH "%%PREFIX%%/share/vmware-tools"
  #endif
  
  #if defined _WIN32
Index: head/emulators/open-vm-tools/files/patch-lib_include_vm__basic__types.h
===================================================================
--- head/emulators/open-vm-tools/files/patch-lib_include_vm__basic__types.h	(revision 471013)
+++ head/emulators/open-vm-tools/files/patch-lib_include_vm__basic__types.h	(revision 471014)
@@ -1,10 +1,10 @@
---- lib/include/vm_basic_types.h.orig	2017-02-24 22:15:37 UTC
+--- lib/include/vm_basic_types.h.orig	2018-03-30 18:44:35 UTC
 +++ lib/include/vm_basic_types.h
-@@ -415,6 +415,7 @@ typedef int64 VmTimeVirtualClock;  /* Vi
+@@ -418,6 +418,7 @@ typedef int64 VmTimeVirtualClock;  /* Virtual Clock ke
        #endif
     #elif defined(__linux__) || \
          (defined(__FreeBSD__) && (__FreeBSD__ + 0))\
 +      || (defined(__clang__)) \
        || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) \
        || (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) \
        || (defined(_POSIX2_VERSION) && _POSIX2_VERSION >= 200112L)
Index: head/emulators/open-vm-tools/files/patch-lib_misc_util__misc.c
===================================================================
--- head/emulators/open-vm-tools/files/patch-lib_misc_util__misc.c	(revision 471013)
+++ head/emulators/open-vm-tools/files/patch-lib_misc_util__misc.c	(revision 471014)
@@ -1,11 +1,11 @@
---- lib/misc/util_misc.c.orig	2017-02-24 22:15:37 UTC
+--- lib/misc/util_misc.c.orig	2018-03-30 18:44:35 UTC
 +++ lib/misc/util_misc.c
-@@ -307,7 +307,7 @@ Util_CanonicalPathsIdentical(const char 
+@@ -303,7 +303,7 @@ Util_CanonicalPathsIdentical(const char *path1,  // IN
     return (strcmp(path1, path2) == 0);
  #elif defined(_WIN32)
     return (_stricmp(path1, path2) == 0);
 -#elif defined(__APPLE__)
 +#elif defined(__APPLE__) || defined(__FreeBSD__)
     return (strcasecmp(path1, path2) == 0);
  #else
     NOT_IMPLEMENTED();
Index: head/emulators/open-vm-tools/files/patch-lib_vmCheck_vmcheck.c
===================================================================
--- head/emulators/open-vm-tools/files/patch-lib_vmCheck_vmcheck.c	(revision 471013)
+++ head/emulators/open-vm-tools/files/patch-lib_vmCheck_vmcheck.c	(revision 471014)
@@ -1,10 +1,10 @@
---- lib/vmCheck/vmcheck.c.orig	2017-02-24 22:15:37 UTC
+--- lib/vmCheck/vmcheck.c.orig	2018-03-30 18:44:35 UTC
 +++ lib/vmCheck/vmcheck.c
-@@ -134,6 +134,7 @@ VmCheckSafe(SafeCheckFn checkFn)
+@@ -135,6 +135,7 @@ VmCheckSafe(SafeCheckFn checkFn)
  #else
     do {
        int signals[] = {
 +         SIGBUS,
           SIGILL,
           SIGSEGV,
        };
Index: head/emulators/open-vm-tools/files/patch-modules_Makefile.am
===================================================================
--- head/emulators/open-vm-tools/files/patch-modules_Makefile.am	(revision 471013)
+++ head/emulators/open-vm-tools/files/patch-modules_Makefile.am	(revision 471014)
@@ -1,19 +1,19 @@
---- modules/Makefile.am.orig	2017-04-25 03:59:07 UTC
+--- modules/Makefile.am.orig	2018-04-18 02:28:12 UTC
 +++ modules/Makefile.am
-@@ -63,11 +63,11 @@ if SOLARIS
+@@ -48,11 +48,11 @@ if SOLARIS
  	done
  endif
  if FREEBSD
 -	for MOD in $(MODULES); do                                              \
 -	   $(INSTALL) -d $(DESTDIR)$(MODULES_DIR);                             \
 -	   $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko                \
 -	      $(DESTDIR)$(MODULES_DIR);                                        \
 -	done
 +#	for MOD in $(MODULES); do                                              \
 +#	   $(INSTALL) -d $(DESTDIR)$(MODULES_DIR);                             \
 +#	   $(INSTALL) -m644 $(modulesrc)/$(MODULES_OS)/$$MOD.ko                \
 +#	      $(DESTDIR)$(MODULES_DIR);                                        \
 +#	done
  endif
- if LINUX
- 	for MOD in $(MODULES); do                                              \
+ 
+ uninstall-hook:
Index: head/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c
===================================================================
--- head/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c	(revision 471013)
+++ head/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vfsops.c	(revision 471014)
@@ -1,26 +1,26 @@
---- modules/freebsd/vmblock/vfsops.c.orig	2017-02-24 22:15:37 UTC
+--- modules/freebsd/vmblock/vfsops.c.orig	2018-03-30 18:44:35 UTC
 +++ modules/freebsd/vmblock/vfsops.c
-@@ -124,6 +124,11 @@ VMBlockVFSMount(struct mount *mp,       
+@@ -124,6 +124,11 @@ VMBlockVFSMount(struct mount *mp,        // IN: mount(
     char *pathname;
     int len, error = 0;
  
 +#if __FreeBSD_version >= 800087
 +   struct thread *td;
 +   td = curthread;
 +#endif
 +
     VMBLOCKDEBUG("VMBlockVFSMount(mp = %p)\n", (void *)mp);
  
     /*
-@@ -277,6 +282,11 @@ VMBlockVFSUnmount(struct mount *mp,    /
+@@ -276,6 +281,11 @@ VMBlockVFSUnmount(struct mount *mp,    // IN: filesyst
+    void *mntdata;
     int error;
     int flags = 0, removed = 0;
- 
++
 +#if __FreeBSD_version >= 800087
 +   struct thread *td;
 +   td = curthread;
 +#endif
-+
+ 
     VMBLOCKDEBUG("VMBlockVFSUnmount: mp = %p\n", (void *)mp);
  
-    xmp = MNTTOVMBLOCKMNT(mp);
Index: head/emulators/open-vm-tools/files/patch-modules_freebsd_vmxnet_net__compat.h
===================================================================
--- head/emulators/open-vm-tools/files/patch-modules_freebsd_vmxnet_net__compat.h	(nonexistent)
+++ head/emulators/open-vm-tools/files/patch-modules_freebsd_vmxnet_net__compat.h	(revision 471014)
@@ -0,0 +1,18 @@
+--- modules/freebsd/vmxnet/net_compat.h.orig	2018-03-30 18:44:35 UTC
++++ modules/freebsd/vmxnet/net_compat.h
+@@ -37,9 +37,14 @@
+ #if __FreeBSD_version < 500016
+    #define VXN_IFMULTI_FIRST LIST_FIRST
+    #define VXN_IFMULTI_NEXT  LIST_NEXT
+-#else /* >= 500016 */
++#else
++#if __FreeBSD_version <= 1200063
+    #define VXN_IFMULTI_FIRST TAILQ_FIRST
+    #define VXN_IFMULTI_NEXT  TAILQ_NEXT
++#else /* > 1200063 */
++   #define VXN_IFMULTI_FIRST CK_STAILQ_FIRST
++   #define VXN_IFMULTI_NEXT  CK_STAILQ_NEXT
++#endif /* 1200063 */
+ #endif /* 500016 */
+ 
+ #if __FreeBSD_version < 500043

Property changes on: head/emulators/open-vm-tools/files/patch-modules_freebsd_vmxnet_net__compat.h
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: head/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c
===================================================================
--- head/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c	(revision 471013)
+++ head/emulators/open-vm-tools/files/patch-services_plugins_vix_vixTools.c	(revision 471014)
@@ -1,56 +1,37 @@
---- services/plugins/vix/vixTools.c.orig	2017-12-15 21:11:49 UTC
+--- services/plugins/vix/vixTools.c.orig	2018-03-30 18:44:35 UTC
 +++ services/plugins/vix/vixTools.c
 @@ -52,6 +52,7 @@
  #include <stdarg.h>
  #include <fcntl.h>
  #include <errno.h>
 +#include <limits.h>
  
  #ifdef _WIN32
  #include <WTypes.h>
-@@ -7330,7 +7331,7 @@ VixToolsRunScript(VixCommandRequestHeader *requestMsg,
-          goto abort;
-       }
-    }
--   for (var = 0; var <= 0xFFFFFFFF; var++) {
-+   for (var = 0; ; var++) {
-       free(tempScriptFilePath);
-       tempScriptFilePath = Str_SafeAsprintf(NULL,
-                                             "%s"DIRSEPS"%s%d%s",
-@@ -7373,6 +7374,9 @@ VixToolsRunScript(VixCommandRequestHeader *requestMsg,
-           */
-          break;
-       }
-+      if (var == INT_MAX) {
-+         break;
-+      }
-    }
-    if (fd < 0) {
-       /*
-@@ -10131,7 +10135,7 @@ abort:
+@@ -10133,7 +10134,7 @@ abort:
     struct passwd pwd;
     struct passwd *ppwd = &pwd;
     char *buffer = NULL; // a pool of memory for Posix_Getpwnam_r() to use.
 -   size_t bufferSize;
 +   long bufferSize;
  
     /*
      * For POSIX systems, look up the uid of 'username', and compare
-@@ -10144,9 +10148,15 @@ abort:
+@@ -10146,9 +10147,15 @@ abort:
      * Multiply by 4 to compensate for the conversion to UTF-8 by
      * the Posix_Getpwnam_r() wrapper.
      */
 -   bufferSize = (size_t) sysconf(_SC_GETPW_R_SIZE_MAX) * 4;
 +   errno = 0;
 +   bufferSize = sysconf(_SC_GETPW_R_SIZE_MAX);
 +   if ((errno != 0) || (bufferSize <= 0)) {
 +      bufferSize = 16 * 1024;  // Unlimited; pick something reasonable
 +   }
  
 -   buffer = Util_SafeMalloc(bufferSize);
 +   bufferSize *= 4;
 +
 +   buffer = Util_SafeMalloc((size_t)bufferSize);
  
     if (Posix_Getpwnam_r(username, &pwd, buffer, bufferSize, &ppwd) != 0 ||
         NULL == ppwd) {