From 5a5a78dc90df3cefb1c9cce93c308054a0e2114c Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 28 Apr 2011 03:18:03 -0500 Subject: main/libc0.9.32: make /etc/localtime work --- ...rsing-of-tzdata-files-where-off_t-is-64-b.patch | 32 ++++++++++++++++++++++ main/libc0.9.32/APKBUILD | 4 ++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 main/libc0.9.32/0001-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch (limited to 'main') diff --git a/main/libc0.9.32/0001-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch b/main/libc0.9.32/0001-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch new file mode 100644 index 000000000..e47d89620 --- /dev/null +++ b/main/libc0.9.32/0001-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch @@ -0,0 +1,32 @@ +From ef44545eb332eac26577ea2672e89b01b3aa5706 Mon Sep 17 00:00:00 2001 +From: William Pitcock +To: uclibc@uclibc.org +Date: Thu, 28 Apr 2011 03:09:20 -0500 +Subject: [PATCH] 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 +--- + 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 19d68e1..1b21f9e 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; + } +-- +1.7.4.5 + diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD index 928c71291..6dfe8f0b1 100644 --- a/main/libc0.9.32/APKBUILD +++ b/main/libc0.9.32/APKBUILD @@ -4,7 +4,7 @@ pkgname=libc$_abiver _gitver= pkgver=0.9.32_rc3 _ver=${pkgver/_/-} -pkgrel=10 +pkgrel=11 pkgdesc="C library for developing embedded Linux systems" url=http://uclibc.org license="LGPL-2" @@ -31,6 +31,7 @@ source="http://uclibc.org/downloads/uClibc-${_ver}.tar.bz2 0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch 0001-utils-ldd-Check-for-returned-pointer-from-strrchr-no.patch 0001-posix_fadvise64-fix-x86-implementation.patch + 0001-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch uclibc-generic-backtrace.patch uclibcconfig.x86 uclibcconfig.x86_64 @@ -136,6 +137,7 @@ b4fb68ad3d0e8331b1b40c30eb21dfdc 0002-stdlib-fix-arc4random-return-type-to-u_in 2ab8c375fe1cd406319b4c5ef538da2b 0001-resolv-fix-res_close-not-to-hang-with-ipv6.patch 12f6297249755d3996918485bbd6031d 0001-utils-ldd-Check-for-returned-pointer-from-strrchr-no.patch 100d026c2d7cf7fc5906229448c791d4 0001-posix_fadvise64-fix-x86-implementation.patch +2548d9f470c9a5b2c117ec3d6f35c105 0001-time-fix-parsing-of-tzdata-files-where-off_t-is-64-b.patch 871956085df0bf90f4054e294a3770ce uclibc-generic-backtrace.patch 35ef159d3c56ad67f520ab033e0f6930 uclibcconfig.x86 a0b00fb82825f91671b76b1d8f979944 uclibcconfig.x86_64 -- cgit v1.2.3