summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2011-04-28 02:56:42 -0500
committerSören Tempel <soeren+git@soeren-tempel.net>2018-03-27 19:08:26 +0200
commite6765bd363d2dd1dcaeeae5117cc25aae53fb944 (patch)
tree2cb906292e122518d7edc20273a568f5f30a501a
parentf06b82a6ad1368fe1b2bb67c8b93e79f846dbdd4 (diff)
downloadposixtz-e6765bd363d2dd1dcaeeae5117cc25aae53fb944.tar.bz2
posixtz-e6765bd363d2dd1dcaeeae5117cc25aae53fb944.tar.xz
posixtz: ensure the file offset we pass to lseek is off_t
on 32-bit systems, sizeof(off_t) is 4, on 64-bit sizeof(off_t) is 8 causing a word masking issue.
-rw-r--r--posixtz.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/posixtz.c b/posixtz.c
index cddcb3e..972ca31 100644
--- a/posixtz.c
+++ b/posixtz.c
@@ -36,7 +36,7 @@ char *posix_tz(const char *filename)
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;