diff options
author | flz <flz@FreeBSD.org> | 2005-11-29 23:43:43 +0800 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2005-11-29 23:43:43 +0800 |
commit | 3e28b2eab9aed9b19d3d4ffc94bea895bcc62f59 (patch) | |
tree | 824c72cbed4d7a2c1c5e721195bdddcbfe6c1224 /emulators/rtc | |
parent | 0b336028505bb515be59ac5ba50769a0b307aeb2 (diff) | |
download | freebsd-ports-gnome-3e28b2eab9aed9b19d3d4ffc94bea895bcc62f59.tar.gz freebsd-ports-gnome-3e28b2eab9aed9b19d3d4ffc94bea895bcc62f59.tar.zst freebsd-ports-gnome-3e28b2eab9aed9b19d3d4ffc94bea895bcc62f59.zip |
- Fix rtc on systems where sizeof(int) != sizeof(long).
- Clean pkg-plist a bit.
- Re-word IGNORE lines and remove quotes.
PR: ports/87546
Submitted by: Simun Mikecin <numisemis@yahoo.com>
Diffstat (limited to 'emulators/rtc')
-rw-r--r-- | emulators/rtc/Makefile | 6 | ||||
-rw-r--r-- | emulators/rtc/files/rtc.c | 10 | ||||
-rw-r--r-- | emulators/rtc/pkg-plist | 4 |
3 files changed, 11 insertions, 9 deletions
diff --git a/emulators/rtc/Makefile b/emulators/rtc/Makefile index 4cbf7638aca4..e69104f14505 100644 --- a/emulators/rtc/Makefile +++ b/emulators/rtc/Makefile @@ -7,7 +7,7 @@ PORTNAME= rtc PORTVERSION= 2004.02.24.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= emulators linux MASTER_SITES= # none DISTFILES= # none @@ -34,11 +34,11 @@ SRC_BASE?= /usr/src .include <bsd.port.pre.mk> .if ${OSVERSION} < 400013 -IGNORE= "Systems prior to 400013 are out of support" +IGNORE= needs a system more recent than 400013 .endif .if !exists(${SRC_BASE}/sys/Makefile) -IGNORE= "Kernel source files required" +IGNORE= needs kernel source files .endif do-extract: diff --git a/emulators/rtc/files/rtc.c b/emulators/rtc/files/rtc.c index 71af426bd82e..16f573caaf0f 100644 --- a/emulators/rtc/files/rtc.c +++ b/emulators/rtc/files/rtc.c @@ -82,7 +82,7 @@ struct rtc_softc { struct callout rtc_handle; struct timespec lasttime; struct selinfo sip; - int woken; + unsigned long woken; void *rtc_ident; } var; }; @@ -338,11 +338,13 @@ rtc_read(dev_t dev, struct uio *uio, int flags __unused) tsleep(&sc->var.rtc_ident, PCATCH, "rtc rd", hz * 10); #if 0 if (sc->var.woken > 1) - printf("woken: %d\n", sc->var.woken); + printf("woken: %lu\n", sc->var.woken); #endif - if (uio->uio_resid == sizeof(int)) { - error = uiomove(&sc->var.woken, sizeof(int), uio); + if (uio->uio_resid == sizeof(unsigned int)) { + error = uiomove(&sc->var.woken, sizeof(unsigned int), uio); + } else if (uio->uio_resid == sizeof(unsigned long)) { + error = uiomove(&sc->var.woken, sizeof(unsigned long), uio); } sc->var.woken = 0; return error; diff --git a/emulators/rtc/pkg-plist b/emulators/rtc/pkg-plist index b142ef15f620..7e19f4baf0a7 100644 --- a/emulators/rtc/pkg-plist +++ b/emulators/rtc/pkg-plist @@ -1,7 +1,7 @@ etc/rc.d/rtc.sh include/rtc.h modules/rtc.ko -share/examples/rtc/test.c -@dirrm share/examples/rtc +%%EXAMPLESDIR%%/test.c +@dirrm %%EXAMPLESDIR%% @unexec rmdir %D/modules 2>/dev/null || true @unexec rm -f /dev/rtc |