From 48ca75555522716f0f686dcae3dd6cf3d8ad714d Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 31 May 2022 11:05:19 +0100 Subject: removed idea of repos --- ...ure-the-file-offset-we-pass-to-lseek-is-o.patch | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 repo/tzdata/0001-posixtz-ensure-the-file-offset-we-pass-to-lseek-is-o.patch (limited to 'repo/tzdata/0001-posixtz-ensure-the-file-offset-we-pass-to-lseek-is-o.patch') diff --git a/repo/tzdata/0001-posixtz-ensure-the-file-offset-we-pass-to-lseek-is-o.patch b/repo/tzdata/0001-posixtz-ensure-the-file-offset-we-pass-to-lseek-is-o.patch new file mode 100644 index 0000000..c4ae70b --- /dev/null +++ b/repo/tzdata/0001-posixtz-ensure-the-file-offset-we-pass-to-lseek-is-o.patch @@ -0,0 +1,27 @@ +From e6765bd363d2dd1dcaeeae5117cc25aae53fb944 Mon Sep 17 00:00:00 2001 +From: William Pitcock +Date: Thu, 28 Apr 2011 02:56:42 -0500 +Subject: [PATCH 1/2] 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. +--- + posixtz.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/posixtz.c b/posixtz.c +index cddcb3e..972ca31 100644 +--- a/posixtz-0.5/posixtz.c ++++ b/posixtz-0.5/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; + +-- +2.16.2 + -- cgit v1.2.1