summaryrefslogtreecommitdiff
path: root/emulators/rtc
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2004-03-03 10:15:11 +0000
committerMartin Blapp <mbr@FreeBSD.org>2004-03-03 10:15:11 +0000
commita0bb6deda55cefb5dd62a447aea44677f8188ed0 (patch)
treedee05d680374e740efb65a72ac4bd722e917338a /emulators/rtc
parentFix the cdev patch to work correctly with FreeBSD4. One check has (diff)
Make rtc module work with FreeBSD 502104.
Diffstat (limited to 'emulators/rtc')
-rw-r--r--emulators/rtc/Makefile4
-rw-r--r--emulators/rtc/files/rtc.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/emulators/rtc/Makefile b/emulators/rtc/Makefile
index 980da696517f..c5dac6d48f9a 100644
--- a/emulators/rtc/Makefile
+++ b/emulators/rtc/Makefile
@@ -7,7 +7,7 @@
PORTNAME= rtc
PORTVERSION= 2004.02.24.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators linux
MASTER_SITES= # none
DISTFILES= # none
@@ -55,7 +55,9 @@ pre-install:
post-install:
${RM} -f ${DEVDIR}/rtc
+.if ${OSVERSION} < 502104
mknod ${DEVDIR}/rtc c ${CDEV_MAJOR} 0
+.endif
${INSTALL_DATA} ${WRKSRC}/rtc.h ${PREFIX}/include/
${MKDIR} ${PREFIX}/share/examples/rtc
${INSTALL_DATA} ${WRKSRC}/test.c ${PREFIX}/share/examples/rtc/
diff --git a/emulators/rtc/files/rtc.c b/emulators/rtc/files/rtc.c
index 9b22c636568c..1b4a315e15d8 100644
--- a/emulators/rtc/files/rtc.c
+++ b/emulators/rtc/files/rtc.c
@@ -93,13 +93,19 @@ static int rtc_modeevent(module_t mod, int cmd, void *arg);
static struct cdevsw rtc_cdevsw = {
#if __FreeBSD_version >= 500104
+#if __FreeBSD_version >= 502104
+ .d_version = D_VERSION,
+ .d_flags = D_NEEDGIANT,
+#endif
.d_open = rtc_open,
.d_close = rtc_close,
.d_ioctl = rtc_ioctl,
.d_poll = rtc_poll,
.d_read = rtc_read,
.d_name = DEVICE_NAME,
+#if __FreeBSD_version < 502104
.d_maj = CDEV_MAJOR,
+#endif
#else
/* open */ rtc_open,
/* close */ rtc_close,