mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 09:19:15 -04:00
Add patch for new cdevsw changes and make vmware working again
with latest CURRENT.
This commit is contained in:
parent
a96806699f
commit
b9d6cd413b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=102505
2 changed files with 75 additions and 2 deletions
|
@ -7,8 +7,7 @@
|
|||
|
||||
PORTNAME= vmware3
|
||||
PORTVERSION= 3.2.1.2242
|
||||
PORTREVISION= 3
|
||||
PORTEPOCH= 1
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= emulators linux
|
||||
MASTER_SITES= http://www4.vmware.com/software/ \
|
||||
${FREEBSD_MODULE_SITES} \
|
||||
|
@ -131,6 +130,9 @@ post-patch:
|
|||
.if ${OSVERSION} < 500000
|
||||
${CAT} ${FILESDIR}/freebsd4.patch | (cd ${WRKSRC} && ${PATCH}) > /dev/null 2>&1
|
||||
.endif
|
||||
.if ${OSVERSION} >= 502104
|
||||
${CAT} ${FILESDIR}/freebsd5.patch | (cd ${WRKSRC} && ${PATCH}) > /dev/null 2>&1
|
||||
.endif
|
||||
|
||||
setoptions:
|
||||
${SED} -e 's;@@PREFIX@@;${PREFIX};' \
|
||||
|
|
71
emulators/vmware3/files/freebsd5.patch
Normal file
71
emulators/vmware3/files/freebsd5.patch
Normal file
|
@ -0,0 +1,71 @@
|
|||
--- vmnet-only/freebsd/vmnet.c Sun Feb 29 11:17:28 2004
|
||||
+++ vmnet-only/freebsd/vmnet.c Sun Feb 29 10:52:01 2004
|
||||
@@ -104,6 +104,10 @@
|
||||
|
||||
static struct cdevsw vmnet_cdevsw = {
|
||||
#if __FreeBSD_version >= 500104
|
||||
+#if __FreeBSD_version >= 502104
|
||||
+ .d_version = D_VERSION,
|
||||
+ .d_flags = D_PSEUDO | D_NEEDGIANT,
|
||||
+#endif
|
||||
.d_open = vmnet_open,
|
||||
.d_close = vmnet_close,
|
||||
.d_read = vmnet_read,
|
||||
@@ -111,7 +115,9 @@
|
||||
.d_ioctl = vmnet_ioctl,
|
||||
.d_poll = vmnet_poll,
|
||||
.d_name = DEVICE_NAME,
|
||||
+#if __FreeBSD_version > 502104
|
||||
.d_maj = CDEV_MAJOR
|
||||
+#endif
|
||||
#else
|
||||
/* open */ vmnet_open,
|
||||
/* close */ vmnet_close,
|
||||
--- vmmon-only/Makefile.freebsd Sun Feb 29 11:17:26 2004
|
||||
+++ vmmon-only/Makefile.freebsd Sun Feb 29 11:02:20 2004
|
||||
@@ -9,6 +9,13 @@
|
||||
KMOD= ${DEVNAME}_${MODEL}
|
||||
CDEV_MAJOR = 200
|
||||
SRCS=
|
||||
+.if !defined(OSVERSION)
|
||||
+.if exists(/sbin/sysctl)
|
||||
+OSVERSION!= /sbin/sysctl -n kern.osreldate
|
||||
+.else
|
||||
+OSVERSION!= /usr/sbin/sysctl -n kern.osreldate
|
||||
+.endif
|
||||
+.endif
|
||||
|
||||
# For 4.0-STABLE
|
||||
# KMODDEPS= linux
|
||||
@@ -32,6 +39,8 @@
|
||||
|
||||
device:
|
||||
rm -f /compat/linux/dev/${DEVNAME}
|
||||
+.if ${OSVERSION} >= 502104
|
||||
mknod /compat/linux/dev/${DEVNAME} c ${CDEV_MAJOR} 0
|
||||
+.endif
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
--- vmmon-only/freebsd/driver.c Sun Feb 29 11:17:28 2004
|
||||
+++ vmmon-only/freebsd/driver.c Sun Feb 29 10:58:11 2004
|
||||
@@ -163,6 +163,10 @@
|
||||
|
||||
static struct cdevsw vmmon_cdevsw = {
|
||||
#if __FreeBSD_version >= 500104
|
||||
+#if __FreeBSD_version >= 502104
|
||||
+ .d_version = D_VERSION,
|
||||
+ .d_flags = D_NEEDGIANT,
|
||||
+#endif
|
||||
.d_open = FreeBSD_Driver_Open,
|
||||
.d_name = DEVICE_NAME,
|
||||
.d_maj = CDEV_MAJOR
|
||||
@@ -172,7 +176,9 @@
|
||||
/* read */ noread,
|
||||
/* psize */ nopsize,
|
||||
/* flags */ 0,
|
||||
+#if __FreeBSD_version > 502104
|
||||
/* bmaj */ -1
|
||||
+#endif
|
||||
#endif
|
||||
};
|
||||
|
Loading…
Add table
Reference in a new issue