diff options
author | William Pitcock <nenolod@dereferenced.org> | 2011-04-28 03:09:20 -0500 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-12-23 15:49:01 +0100 |
commit | 0be0174259a3a35313fe1a0413630b919f910f5b (patch) | |
tree | bfd49666b069780930685ad3c9c507bb9b4342fe /libc/misc/time/time.c | |
parent | 1bdf3d74afad552ff99182af70536f23549a434f (diff) | |
download | uClibc-alpine-0be0174259a3a35313fe1a0413630b919f910f5b.tar.bz2 uClibc-alpine-0be0174259a3a35313fe1a0413630b919f910f5b.tar.xz |
time: fix parsing of tzdata files where off_t is 64-bit
lseek takes off_t as the offset type, but gcc will normally pass a
32-bit value unless the number is wider than 16 bits. so we force
gcc to pass the constant as off_t type always by casting the constant
to off_t.
Signed-off-by: William Pitcock <nenolod@dereferenced.org>
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Diffstat (limited to 'libc/misc/time/time.c')
-rw-r--r-- | libc/misc/time/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index 19d68e105..1b21f9e11 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -1856,7 +1856,7 @@ ERROR: if (r != TZ_BUFLEN || strncmp(buf, "TZif", 4) != 0 || (unsigned char)buf[4] < 2 - || lseek(fd, -TZ_BUFLEN, SEEK_END) < 0 + || lseek(fd, (off_t) -TZ_BUFLEN, SEEK_END) < 0 ) { goto ERROR; } |