aboutsummaryrefslogtreecommitdiff
path: root/emulators/rtc
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2005-11-29 15:43:43 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2005-11-29 15:43:43 +0000
commit87e9dc7ae1c6a85293af9cd8c8ab0eab480c9abb (patch)
treeda20d2a2faa1b9472a1bbff32d3967792a255a5f /emulators/rtc
parent846ef9b7d8b76883653a3a16472a76285b6be10d (diff)
downloadports-87e9dc7ae1c6a85293af9cd8c8ab0eab480c9abb.tar.gz
ports-87e9dc7ae1c6a85293af9cd8c8ab0eab480c9abb.zip
Notes
Diffstat (limited to 'emulators/rtc')
-rw-r--r--emulators/rtc/Makefile6
-rw-r--r--emulators/rtc/files/rtc.c10
-rw-r--r--emulators/rtc/pkg-plist4
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