Fix build on 9 and 10.
Submitted by: pointyhat via erwin
This commit is contained in:
parent
331bef22b7
commit
6ec313be7b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=282500
@ -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>
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user