diff options
author | Florent Thoumie <flz@FreeBSD.org> | 2005-11-29 15:43:43 +0000 |
---|---|---|
committer | Florent Thoumie <flz@FreeBSD.org> | 2005-11-29 15:43:43 +0000 |
commit | 87e9dc7ae1c6a85293af9cd8c8ab0eab480c9abb (patch) | |
tree | da20d2a2faa1b9472a1bbff32d3967792a255a5f /emulators/rtc/files | |
parent | - Fix issue with madoka IRC proxy. (diff) |
- 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>
Notes
Notes:
svn path=/head/; revision=149914
Diffstat (limited to 'emulators/rtc/files')
-rw-r--r-- | emulators/rtc/files/rtc.c | 10 |
1 files changed, 6 insertions, 4 deletions
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; |