diff options
author | mbr <mbr@FreeBSD.org> | 2004-03-03 18:15:11 +0800 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2004-03-03 18:15:11 +0800 |
commit | 93a88afadd46c1fd75b31e3547f108d8692670ab (patch) | |
tree | d0683fd2b7537cfce1ebd69ae2baa9d3d11971be /emulators | |
parent | 48b14ddccf29ad661936504d36b8b3ba8ce9d10b (diff) | |
download | freebsd-ports-gnome-93a88afadd46c1fd75b31e3547f108d8692670ab.tar.gz freebsd-ports-gnome-93a88afadd46c1fd75b31e3547f108d8692670ab.tar.zst freebsd-ports-gnome-93a88afadd46c1fd75b31e3547f108d8692670ab.zip |
Make rtc module work with FreeBSD 502104.
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/rtc/Makefile | 4 | ||||
-rw-r--r-- | emulators/rtc/files/rtc.c | 6 |
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, |