diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2001-09-16 06:42:36 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2001-09-16 06:42:36 +0000 |
commit | 5f50ae13d719810207140e32aa5de0a2a4a1a621 (patch) | |
tree | badaee8fb265f87026e3f3f729281a4a636ddbaf /emulators/rtc | |
parent | 17e38f6c4e579503c80989972b4f6aec74efc8cc (diff) | |
download | ports-5f50ae13d719810207140e32aa5de0a2a4a1a621.tar.gz ports-5f50ae13d719810207140e32aa5de0a2a4a1a621.zip |
Notes
Diffstat (limited to 'emulators/rtc')
-rw-r--r-- | emulators/rtc/Makefile | 13 | ||||
-rw-r--r-- | emulators/rtc/files/rtc.c | 20 | ||||
-rw-r--r-- | emulators/rtc/files/rtc_linux.c | 8 |
3 files changed, 29 insertions, 12 deletions
diff --git a/emulators/rtc/Makefile b/emulators/rtc/Makefile index f731802dd030..401fb6672c4d 100644 --- a/emulators/rtc/Makefile +++ b/emulators/rtc/Makefile @@ -6,7 +6,7 @@ # PORTNAME= rtc -PORTVERSION= 2000.09.22 +PORTVERSION= 2001.09.16 CATEGORIES= emulators linux MASTER_SITES= # none DISTFILES= # none @@ -47,17 +47,6 @@ do-extract: ${FILESDIR}/${STARTUP} > ${WRKDIR}/${STARTUP} @cd ${FILESDIR} && ${CP} Makefile *.[ch] ${WRKSRC}/ -post-patch: -.if !exists(${SRC_BASE}/sys/compat/linux/linux_ioctl.h) - ${PERL} -i -pe 's,compat(/linux/linux_ioctl\.h),i386$$1,' \ - ${WRKSRC}/rtc_linux.c -.endif - @if ! grep -w dev2unit ${SRC_BASE}/sys/kern/kern_conf.c >/dev/null; \ - then \ - ${ECHO} "dev2unit() not found in sys/kern/kern_conf.c. Using lminor() instead."; \ - ${PERL} -i -pe 's,dev2unit,lminor,' ${WRKSRC}/rtc.c; \ - fi - pre-install: ${MKDIR} ${KMODDIR} ${MKDIR} ${DEVDIR} diff --git a/emulators/rtc/files/rtc.c b/emulators/rtc/files/rtc.c index ff6899e3251b..9eb6a90dcf4d 100644 --- a/emulators/rtc/files/rtc.c +++ b/emulators/rtc/files/rtc.c @@ -115,7 +115,11 @@ rtc_attach(dev_t dev) struct rtc_softc *sc; int unit; +#if __FreeBSD_version >= 500014 unit = dev2unit(dev); +#else + unit = lminor(dev); +#endif DLog(Lenter, "%d %p", unit, dev); if (dev->si_drv1) { DLog(Lexit, "old %p, %p", dev, dev->si_drv1); @@ -161,7 +165,11 @@ rtc_detach(struct rtc_softc *sc) /* -=-=-=-=-=-=-=-=-= character device stuff -=-=-=-=-=-=-=-=-= */ int +#if __FreeBSD_version >= 500023 +rtc_open(dev_t dev, int oflag, int otyp, struct thread *p) +#else rtc_open(dev_t dev, int oflag, int otyp, struct proc *p) +#endif { struct rtc_softc *sc; @@ -181,7 +189,11 @@ rtc_open(dev_t dev, int oflag, int otyp, struct proc *p) } int +#if __FreeBSD_version >= 500023 +rtc_close(dev_t dev, int fflag, int otyp, struct thread *p) +#else rtc_close(dev_t dev, int fflag, int otyp, struct proc *p) +#endif { struct rtc_softc *sc = (struct rtc_softc *) dev->si_drv1; @@ -190,7 +202,11 @@ rtc_close(dev_t dev, int fflag, int otyp, struct proc *p) } int +#if __FreeBSD_version >= 500023 +rtc_ioctl(dev_t dev, u_long cmd, caddr_t arg, int mode, struct thread *p) +#else rtc_ioctl(dev_t dev, u_long cmd, caddr_t arg, int mode, struct proc *p) +#endif { struct rtc_softc *sc = (struct rtc_softc *) dev->si_drv1; int error=0; @@ -215,7 +231,11 @@ rtc_ioctl(dev_t dev, u_long cmd, caddr_t arg, int mode, struct proc *p) } int +#if __FreeBSD_version >= 500023 +rtc_poll(dev_t dev, int events, struct thread *p) +#else rtc_poll(dev_t dev, int events, struct proc *p) +#endif { struct rtc_softc *sc = (struct rtc_softc *) dev->si_drv1; int revents = 0; diff --git a/emulators/rtc/files/rtc_linux.c b/emulators/rtc/files/rtc_linux.c index df112d87212d..85f388cec142 100644 --- a/emulators/rtc/files/rtc_linux.c +++ b/emulators/rtc/files/rtc_linux.c @@ -33,7 +33,11 @@ #include <i386/linux/linux.h> #include <i386/linux/linux_proto.h> +#if __FreeBSD_version >= 500012 || __FreeBSD_version >= 430000 #include <compat/linux/linux_ioctl.h> +#else +#include <i386/linux/linux_ioctl.h> +#endif #include "rtc.h" @@ -56,7 +60,11 @@ SYSUNINIT(n##unregister, SI_SUB_KLD, SI_ORDER_MIDDLE, linux_ioctl_unregister_han LINUX_IOCTL_SET(rtc, 0x7000, 0x70ff); static int +#if __FreeBSD_version >= 500023 +linux_ioctl_rtc(struct thread *p, struct linux_ioctl_args *args) +#else linux_ioctl_rtc(struct proc *p, struct linux_ioctl_args *args) +#endif { switch (args->cmd & 0xffff) { case LINUX_RTC_PIE_ON: |