- 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>
This commit is contained in:
Florent Thoumie 2005-11-29 15:43:43 +00:00
parent 846ef9b7d8
commit 87e9dc7ae1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=149914
3 changed files with 11 additions and 9 deletions

View file

@ -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:

View file

@ -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;

View file

@ -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