aboutsummaryrefslogtreecommitdiff
path: root/multimedia/linux_dvbwrapper-kmod
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/linux_dvbwrapper-kmod')
-rw-r--r--multimedia/linux_dvbwrapper-kmod/Makefile6
-rw-r--r--multimedia/linux_dvbwrapper-kmod/files/linux_dvbwrapper.c18
2 files changed, 16 insertions, 8 deletions
diff --git a/multimedia/linux_dvbwrapper-kmod/Makefile b/multimedia/linux_dvbwrapper-kmod/Makefile
index 53a21ab32c36..47e03abfdaf7 100644
--- a/multimedia/linux_dvbwrapper-kmod/Makefile
+++ b/multimedia/linux_dvbwrapper-kmod/Makefile
@@ -40,10 +40,4 @@ do-extract:
${MKDIR} ${WRKSRC}
${CP} ${FILESDIR}/Makefile ${FILESDIR}/*.[ch] ${WRKSRC}
-post-patch:
-# Fix the build after fget(9) KPI was changed in r224778
-.if ${OSVERSION} > 900040
- ${REINPLACE_CMD} -e '/fget/s/&fp/CAP_IOCTL, &/' ${WRKSRC}/*.c
-.endif
-
.include <bsd.port.post.mk>
diff --git a/multimedia/linux_dvbwrapper-kmod/files/linux_dvbwrapper.c b/multimedia/linux_dvbwrapper-kmod/files/linux_dvbwrapper.c
index 8045c12e94c7..c1f1b680fe9b 100644
--- a/multimedia/linux_dvbwrapper-kmod/files/linux_dvbwrapper.c
+++ b/multimedia/linux_dvbwrapper-kmod/files/linux_dvbwrapper.c
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: /tmp/pcvs/ports/multimedia/linux_dvbwrapper-kmod/files/linux_dvbwrapper.c,v 1.1 2011-04-24 15:51:13 nox Exp $");
+__FBSDID("$FreeBSD: /tmp/pcvs/ports/multimedia/linux_dvbwrapper-kmod/files/linux_dvbwrapper.c,v 1.2 2011-09-27 17:37:18 nox Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -39,6 +39,10 @@ __FBSDID("$FreeBSD: /tmp/pcvs/ports/multimedia/linux_dvbwrapper-kmod/files/linux
#include <sys/mman.h>
#include <sys/resourcevar.h>
+#if __FreeBSD_version > 900040
+#include <sys/capability.h>
+#endif
+
#include <vm/vm.h>
#include <vm/pmap.h>
#include <vm/vm_extern.h>
@@ -295,7 +299,12 @@ linux_ioctl_dvb(struct thread *td, struct linux_ioctl_args *args)
goto out2;
copyout(vp, (void *)uvp, propsiz);
- if ((error = fget(td, args->fd, &fp)) != 0) {
+#if __FreeBSD_version > 900040
+ if ((error = fget(td, args->fd, CAP_IOCTL, &fp)) != 0)
+#else
+ if ((error = fget(td, args->fd, &fp)) != 0)
+#endif
+ {
(void)copyout_unmap(td, uvp, propsiz);
goto out2;
}
@@ -329,6 +338,11 @@ linux_ioctl_dvb(struct thread *td, struct linux_ioctl_args *args)
default: return (ENOIOCTL);
}
+/* actually r225618 but __FreeBSD_version wasn't bumped */
+#if __FreeBSD_version > 900043
+ error = sys_ioctl(td, (struct ioctl_args *)args);
+#else
error = ioctl(td, (struct ioctl_args *)args);
+#endif
return (error);
}