1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-01 10:59:55 +00:00

Fix build on 7.x.

Reported by:	pav
This commit is contained in:
Hiroki Sato 2011-07-17 22:04:26 +00:00
parent 5ade40d72e
commit 5e9e0b6295
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=277878
3 changed files with 42 additions and 4 deletions

View File

@ -41,10 +41,6 @@ _KERNCONF?=$K
IGNORE= requires kernel source to be installed
.endif
.if ${OSVERSION} < 800000
BROKEN= does not compile on FreeBSD 7.X
.endif
do-install:
@${MKDIR} ${PREFIX}/${KMODDIR}
${INSTALL_KLD} ${BUILD_WRKSRC}/ptx.ko ${PREFIX}/${KMODDIR}

View File

@ -0,0 +1,14 @@
--- dev/ptx/ptx.h.orig 2011-07-18 06:50:50.000000000 +0900
+++ dev/ptx/ptx.h 2011-07-18 06:51:26.000000000 +0900
@@ -218,7 +218,11 @@
struct cdev *dev[MAX_STREAM];
struct ptx_stream stream[MAX_STREAM];
+#if (__FreeBSD_version < 800000)
+ struct proc *ptxdaemon;
+#else
struct thread *ptxdaemon;
+#endif
int ring_pos;
int data_pos;

View File

@ -0,0 +1,28 @@
--- dev/ptx/ptx_proc.c.orig 2011-07-18 06:48:32.000000000 +0900
+++ dev/ptx/ptx_proc.c 2011-07-18 06:53:27.000000000 +0900
@@ -23,8 +23,13 @@
int
ptx_proc_start(struct ptx_softc *scp)
{
+#if (__FreeBSD_version < 800000)
+ int err = kthread_create(ptx_daemon, scp, &scp->ptxdaemon,
+ RFTHREAD, 0, "ptxdaemon");
+#else
int err = kthread_add(ptx_daemon, scp, NULL,
&scp->ptxdaemon, RFTHREAD, 0, "ptxdaemon");
+#endif
if (err) {
device_printf(scp->device, "ptx_proc_start: kthread_add retured %d\n", err);
return ENXIO;
@@ -81,7 +86,11 @@
ptx_pause("ptxdmn", MSTOTICK(1));
}
+#if (__FreeBSD_version < 800000)
+ kthread_exit(0);
+#else
kthread_exit();
+#endif
}
static void