diff options
author | Steve Wills <swills@FreeBSD.org> | 2014-04-25 15:39:46 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2014-04-25 15:39:46 +0000 |
commit | 02342a56b4361733a41c4b87914fb49d9e3c904f (patch) | |
tree | df7ab248314878f617edc30efa645e543438c89c | |
parent | Stage support. (diff) |
- Fix build on 11-CURRENT by patching:
modules/freebsd/vmhgfs/channel.h [2] [3]
libvmtools/i18n.c [2]
modules/freebsd/vmmemctl/os.c [4]
PR: ports/187426 [1]
PR: ports/188744 [2]
Submitted by: alfred [2]
Submitted by: garga [3]
Submitted by: bdrewery [4]
9 files changed, 131 insertions, 27 deletions
diff --git a/emulators/open-vm-tools/Makefile b/emulators/open-vm-tools/Makefile index dbfb44f9afb4..debbd82e02da 100644 --- a/emulators/open-vm-tools/Makefile +++ b/emulators/open-vm-tools/Makefile @@ -3,7 +3,7 @@ PORTNAME= open-vm-tools PORTVERSION= ${BUILD_VER} -PORTREVISION= 4 +PORTREVISION= 5 PORTEPOCH= 1 CATEGORIES= emulators MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/stable-9.4.x @@ -46,7 +46,6 @@ USES= pkgconfig kmod USE_GNOME= glib20 USE_LDCONFIG= yes CPPFLAGS+= -Wno-deprecated-declarations -KMODDIR= ${PREFIX}/lib/vmware-tools/modules/drivers SSP_UNSAFE= kernel module does not support ssp diff --git a/emulators/open-vm-tools/files/patch-configure b/emulators/open-vm-tools/files/patch-configure index da02caba832c..2fa60a0f50d4 100644 --- a/emulators/open-vm-tools/files/patch-configure +++ b/emulators/open-vm-tools/files/patch-configure @@ -1,5 +1,5 @@ --- ./configure.orig 2013-09-23 15:51:43.000000000 +0000 -+++ ./configure 2013-11-17 22:40:51.197285671 +0000 ++++ ./configure 2014-04-23 15:36:44.174844399 +0000 @@ -2823,6 +2823,9 @@ x86_64) userSpaceBitness="64" @@ -29,3 +29,12 @@ ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" if test "x$ac_cv_header_wchar_h" = xyes; then : +@@ -22238,7 +22229,7 @@ + + ### General flags / actions + CFLAGS="$CFLAGS -Wall" +-CFLAGS="$CFLAGS -Werror" ++CFLAGS="$CFLAGS -Werror -Wno-unused-function" + + # -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident' in Xlib.h on OpenSolaris. + for TEST_CFLAG in -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing \ diff --git a/emulators/open-vm-tools/files/patch-if_vxn.c b/emulators/open-vm-tools/files/patch-if_vxn.c deleted file mode 100644 index 4ecf23373968..000000000000 --- a/emulators/open-vm-tools/files/patch-if_vxn.c +++ /dev/null @@ -1,13 +0,0 @@ ---- modules/freebsd/vmxnet/if_vxn.c.orig 2013-11-16 03:47:08.000000000 +0000 -+++ modules/freebsd/vmxnet/if_vxn.c 2013-11-16 03:51:10.000000000 +0000 -@@ -76,6 +76,10 @@ - #include <pci/pcivar.h> - #endif - -+#if __FreeBSD_version >= 1100001 -+#include <net/if_var.h> -+#endif -+ - /* define INLINE the way gcc likes it */ - #define INLINE __inline__ - diff --git a/emulators/open-vm-tools/files/patch-lib__vmCheck__vmcheck.c b/emulators/open-vm-tools/files/patch-lib__vmCheck__vmcheck.c index 7dc5b9404505..6042058fe538 100644 --- a/emulators/open-vm-tools/files/patch-lib__vmCheck__vmcheck.c +++ b/emulators/open-vm-tools/files/patch-lib__vmCheck__vmcheck.c @@ -1,5 +1,5 @@ ---- lib/vmCheck/vmcheck.c.orig 2013-09-23 08:51:10.000000000 -0700 -+++ lib/vmCheck/vmcheck.c 2014-01-27 20:58:46.000000000 -0800 +--- ./lib/vmCheck/vmcheck.c.orig 2013-09-23 15:51:10.000000000 +0000 ++++ ./lib/vmCheck/vmcheck.c 2014-04-23 15:36:44.323843725 +0000 @@ -134,6 +134,7 @@ #else do { diff --git a/emulators/open-vm-tools/files/patch-libvmtools__i18n.c b/emulators/open-vm-tools/files/patch-libvmtools__i18n.c new file mode 100644 index 000000000000..7f76437af143 --- /dev/null +++ b/emulators/open-vm-tools/files/patch-libvmtools__i18n.c @@ -0,0 +1,18 @@ +--- libvmtools/i18n.c.orig 2014-04-17 19:02:44.102203216 +0000 ++++ libvmtools/i18n.c 2014-04-17 19:08:48.881598972 +0000 +@@ -88,6 +88,7 @@ + } + + ++#ifdef BUG_ON + /* + ****************************************************************************** + * MsgHasMsgID -- */ /** +@@ -112,6 +113,7 @@ + *(s += MSG_MAGIC_LEN) == '(' && + strchr(s + 1, ')') != NULL; + } ++#endif + + + /* diff --git a/emulators/open-vm-tools/files/patch-modules__freebsd__vmhgfs__channel.h b/emulators/open-vm-tools/files/patch-modules__freebsd__vmhgfs__channel.h new file mode 100644 index 000000000000..e2bac2529c37 --- /dev/null +++ b/emulators/open-vm-tools/files/patch-modules__freebsd__vmhgfs__channel.h @@ -0,0 +1,11 @@ +--- modules/freebsd/vmhgfs/channel.h.orig 2014-04-23 15:36:34.432844311 +0000 ++++ modules/freebsd/vmhgfs/channel.h 2014-04-23 15:36:44.389843756 +0000 +@@ -21,7 +21,7 @@ + */ + + #ifndef _HGFS_CHANNEL_H_ +-#define _HGFS_CHANNEL__H_ ++#define _HGFS_CHANNEL_H_ + + #include "hgfs_kernel.h" + #include "requestInt.h" diff --git a/emulators/open-vm-tools/files/patch-modules__freebsd__vmxnet__if_vxn.c b/emulators/open-vm-tools/files/patch-modules__freebsd__vmxnet__if_vxn.c new file mode 100644 index 000000000000..bfc3eb81d128 --- /dev/null +++ b/emulators/open-vm-tools/files/patch-modules__freebsd__vmxnet__if_vxn.c @@ -0,0 +1,55 @@ +--- ./modules/freebsd/vmxnet/if_vxn.c.orig 2013-09-23 15:51:10.000000000 +0000 ++++ ./modules/freebsd/vmxnet/if_vxn.c 2014-04-23 15:36:44.347844739 +0000 +@@ -76,6 +76,10 @@ + #include <pci/pcivar.h> + #endif + ++#if __FreeBSD_version >= 1100001 ++#include <net/if_var.h> ++#endif ++ + /* define INLINE the way gcc likes it */ + #define INLINE __inline__ + +@@ -936,14 +940,14 @@ + if (m != NULL) { + struct mbuf *m_new = NULL; + +- MGETHDR(m_new, M_DONTWAIT, MT_DATA); ++ MGETHDR(m_new, M_NOWAIT, MT_DATA); + if (m_new == NULL) { + printf("vxn%d: no memory for tx list\n", VXN_IF_UNIT(ifp)); + return 1; + } + + if (m_head->m_pkthdr.len > MHLEN) { +- MCLGET(m_new, M_DONTWAIT); ++ MCLGET(m_new, M_NOWAIT); + if (!(m_new->m_flags & M_EXT)) { + m_freem(m_new); + printf("vxn%d: no memory for tx list\n", VXN_IF_UNIT(ifp)); +@@ -1266,9 +1270,9 @@ + /* + * Allocate a new mbuf cluster to replace the current one + */ +- MGETHDR(m_new, M_DONTWAIT, MT_DATA); ++ MGETHDR(m_new, M_NOWAIT, MT_DATA); + if (m_new != NULL) { +- MCLGET(m_new, M_DONTWAIT); ++ MCLGET(m_new, M_NOWAIT); + if (m_new->m_flags & M_EXT) { + m_adj(m_new, ETHER_ALIGN); + } else { +@@ -1401,10 +1405,10 @@ + * Allocate an mbuf and initialize it to contain a packet header and + * internal data. + */ +- MGETHDR(m_new, M_DONTWAIT, MT_DATA); ++ MGETHDR(m_new, M_NOWAIT, MT_DATA); + if (m_new != NULL) { + /* Allocate and attach an mbuf cluster to mbuf. */ +- MCLGET(m_new, M_DONTWAIT); ++ MCLGET(m_new, M_NOWAIT); + if (m_new->m_flags & M_EXT) { + m_adj(m_new, ETHER_ALIGN); + sc->vxn_rx_ring[i].paddr = (uint32)vtophys(mtod(m_new, caddr_t)); diff --git a/emulators/open-vm-tools/files/patch-vmmemctl-os.c b/emulators/open-vm-tools/files/patch-vmmemctl-os.c index 201906c49850..e64163233c55 100644 --- a/emulators/open-vm-tools/files/patch-vmmemctl-os.c +++ b/emulators/open-vm-tools/files/patch-vmmemctl-os.c @@ -1,5 +1,5 @@ ---- modules/freebsd/vmmemctl/os.c.orig 2013-09-23 15:51:10.000000000 +0000 -+++ modules/freebsd/vmmemctl/os.c 2013-11-16 19:55:06.152925027 +0000 +--- modules/freebsd/vmmemctl/os.c.orig 2013-09-23 10:51:10.000000000 -0500 ++++ modules/freebsd/vmmemctl/os.c 2014-04-23 15:51:43.823041178 -0500 @@ -37,9 +37,11 @@ #include <sys/param.h> #include <sys/systm.h> @@ -12,7 +12,19 @@ #include <sys/sysctl.h> #include <vm/vm.h> -@@ -295,7 +297,13 @@ +@@ -223,7 +225,11 @@ static __inline__ unsigned long os_ffz(u + unsigned long + OS_ReservedPageGetLimit(void) + { ++#if __FreeBSD_version < 1100015 + return cnt.v_page_count; ++#else ++ return vm_cnt.v_page_count; ++#endif + } + + +@@ -295,7 +301,13 @@ OS_ReservedPageGetHandle(PA64 pa) // Mapping OS_MapPageHandle(PageHandle handle) // IN { @@ -26,7 +38,7 @@ vm_page_t page = (vm_page_t)handle; if (!res) { -@@ -352,7 +360,11 @@ +@@ -352,7 +364,11 @@ void OS_UnmapPage(Mapping mapping) // IN { pmap_qremove((vm_offset_t)mapping, 1); @@ -38,7 +50,19 @@ } -@@ -369,14 +381,23 @@ +@@ -360,7 +376,11 @@ static void + os_pmap_alloc(os_pmap *p) // IN + { + /* number of pages (div. 8) */ ++#if __FreeBSD_version < 1100015 + p->size = (cnt.v_page_count + 7) / 8; ++#else ++ p->size = (vm_cnt.v_page_count + 7) / 8; ++#endif + + /* + * expand to nearest word boundary +@@ -369,14 +389,23 @@ os_pmap_alloc(os_pmap *p) // IN p->size = (p->size + sizeof(unsigned long) - 1) & ~(sizeof(unsigned long) - 1); @@ -62,7 +86,7 @@ p->size = 0; p->bitmap = NULL; } -@@ -449,12 +470,31 @@ +@@ -449,12 +478,31 @@ os_kmem_free(vm_page_t page) // IN os_state *state = &global_state; os_pmap *pmap = &state->pmap; @@ -99,7 +123,7 @@ } -@@ -466,8 +506,19 @@ +@@ -466,8 +514,19 @@ os_kmem_alloc(int alloc_normal_failed) / os_state *state = &global_state; os_pmap *pmap = &state->pmap; @@ -119,7 +143,7 @@ return NULL; } -@@ -488,6 +539,11 @@ +@@ -488,6 +547,11 @@ os_kmem_alloc(int alloc_normal_failed) / if (!page) { os_pmap_putindex(pmap, pindex); } diff --git a/emulators/open-vm-tools/pkg-plist b/emulators/open-vm-tools/pkg-plist index 060bbd7c1366..ce99346ee569 100644 --- a/emulators/open-vm-tools/pkg-plist +++ b/emulators/open-vm-tools/pkg-plist @@ -16,6 +16,7 @@ lib/open-vm-tools/plugins/common/libvix.la %%X11%%lib/open-vm-tools/plugins/vmusr/libresolutionSet.so %%X11%%lib/open-vm-tools/plugins/vmusr/libdesktopEvents.so %%X11%%lib/open-vm-tools/plugins/vmusr/libdndcp.so +%%X11%%etc/xdg/autostart/vmware-user.desktop lib/libhgfs.a lib/libhgfs.la lib/libhgfs.so @@ -58,13 +59,13 @@ share/vmware-tools/scripts/vmware/network @unexec if test -f %D/share/vmware-tools/tools.conf; then rm -f %D/share/vmware-tools/tools.conf; fi @unexec if test -h %D/etc/vmware-tools/plugins; then rm -f %D/etc/vmware-tools/plugins; fi etc/pam.d/vmtoolsd +@dirrmtry lib/vmware-tools/modules/drivers @dirrmtry lib/vmware-tools/modules/input @dirrmtry lib/vmware-tools/modules @dirrmtry lib/vmware-tools @dirrmtry share/vmware-tools/scripts/vmware @dirrmtry share/vmware-tools/scripts @dirrmtry share/vmware-tools -@dirrmtry libdata/pkgconfig @dirrm lib/open-vm-tools/plugins/common @dirrm lib/open-vm-tools/plugins/vmsvc %%X11%%@dirrm lib/open-vm-tools/plugins/vmusr |