diff options
author | knu <knu@FreeBSD.org> | 2001-07-12 14:26:10 +0000 |
---|---|---|
committer | knu <knu@FreeBSD.org> | 2001-07-12 14:26:10 +0000 |
commit | 8b676ab135be20abe601aef8b908aba65c0c12ef (patch) | |
tree | ee2b40a520c6871bddd0dd73bc5ce3ced11caad8 /emulators/vmware2 | |
parent | 8e341b404f8c9bc7b092d8a0135a25307b422e2c (diff) | |
download | FreeBSD-ports-8b676ab135be20abe601aef8b908aba65c0c12ef.zip FreeBSD-ports-8b676ab135be20abe601aef8b908aba65c0c12ef.tar.gz |
Fix for the latest CURRENT. (SMPng folks, feel free to correct it if
it's a wrong fix)
Tested by: kuriyama
Diffstat (limited to 'emulators/vmware2')
-rw-r--r-- | emulators/vmware2/Makefile | 6 | ||||
-rw-r--r-- | emulators/vmware2/files/patch-be | 52 |
2 files changed, 39 insertions, 19 deletions
diff --git a/emulators/vmware2/Makefile b/emulators/vmware2/Makefile index 6fc7ca9..e80642e 100644 --- a/emulators/vmware2/Makefile +++ b/emulators/vmware2/Makefile @@ -8,7 +8,7 @@ PORTNAME= vmware2 PORTVERSION= 2.0.3.799 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators linux MASTER_SITES= http://www4.vmware.com/software/ \ ${FREEBSD_MODULE_SITES} \ @@ -98,10 +98,6 @@ post-patch: ${WRKSRC}/vmmon-only/freebsd/*.c .endif cd ${WRKSRC}/vmmon-only/freebsd && ${TOUCH} bus_if.h device_if.h -.if ${OSVERSION} >= 500018 - ${PERL} -i -pe 's,<sys/lock\.h>,<sys/mutex.h>,' \ - ${WRKSRC}/vmmon-only/freebsd/*.c -.endif .if ${OSVERSION} >= 500019 ${PERL} -i -pe 's,<machine/ioctl_fd\.h>,<sys/fdcio.h>,' \ ${WRKSRC}/vmmon-only/freebsd/*.c \ diff --git a/emulators/vmware2/files/patch-be b/emulators/vmware2/files/patch-be index 0f1463f..1bfac1c 100644 --- a/emulators/vmware2/files/patch-be +++ b/emulators/vmware2/files/patch-be @@ -1,61 +1,85 @@ ---- vmmon-only/freebsd/hostif.c.orig Wed Jun 6 22:49:52 2001 -+++ vmmon-only/freebsd/hostif.c Thu Jun 7 13:13:02 2001 -@@ -107,7 +107,13 @@ +--- vmmon-only/freebsd/hostif.c.orig Thu Jul 12 22:05:29 2001 ++++ vmmon-only/freebsd/hostif.c Thu Jul 12 22:14:09 2001 +@@ -55,7 +55,11 @@ + + #include <vm/vm.h> + #include <vm/vm_param.h> ++#if __FreeBSD_version >= 500018 ++#include <sys/mutex.h> ++#else + #include <sys/lock.h> ++#endif + #include <vm/pmap.h> + #include <vm/vm_map.h> + #include <vm/vm_page.h> +@@ -107,7 +111,16 @@ paddr = (vm_offset_t)addr; m = PHYS_TO_VM_PAGE(paddr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif vm_page_wire(m); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif return 0; } -@@ -120,7 +126,13 @@ +@@ -120,7 +133,16 @@ paddr = (vm_offset_t)addr; m = PHYS_TO_VM_PAGE(paddr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif vm_page_unwire(m, 1); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif return 0; } -@@ -1066,10 +1078,16 @@ +@@ -1066,10 +1088,19 @@ return NULL; } paddr = vtophys(addr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); ka->map = PHYS_TO_VM_PAGE(paddr); vm_page_wire(ka->map); pmap_kenter(ka->kaddr, paddr); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif return ka->kaddr; } -@@ -1079,9 +1097,15 @@ +@@ -1079,9 +1110,18 @@ if (ka->map==NULL) return 0; -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++ GIANT_REQUIRED; ++#elif __FreeBSD_version >= 500013 + mtx_lock(&vm_mtx); +#endif vm_page_unwire(ka->map, 1); pmap_kremove(ka->kaddr); kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); -+#if __FreeBSD_version >= 500013 ++#if __FreeBSD_version >= 500021 ++#elif __FreeBSD_version >= 500013 + mtx_unlock(&vm_mtx); +#endif ka->kaddr = 0; |