diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-01-08 15:39:11 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-01-08 15:39:11 +0000 |
commit | c5d1f1527beef6b38013ffb51795c13859095d37 (patch) | |
tree | 8e00413078d0c420a20705657c90d36e9675c42a /package/zlib/patches/110-largefile_fix.patch | |
parent | 949f74899c0e39037959c19fe5944856a96b58b4 (diff) | |
download | master-187ad058-c5d1f1527beef6b38013ffb51795c13859095d37.tar.gz master-187ad058-c5d1f1527beef6b38013ffb51795c13859095d37.tar.bz2 master-187ad058-c5d1f1527beef6b38013ffb51795c13859095d37.zip |
zlib: fix duplicate function declarations for largefile support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29690 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/zlib/patches/110-largefile_fix.patch')
-rw-r--r-- | package/zlib/patches/110-largefile_fix.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/package/zlib/patches/110-largefile_fix.patch b/package/zlib/patches/110-largefile_fix.patch new file mode 100644 index 0000000000..d4d1185cba --- /dev/null +++ b/package/zlib/patches/110-largefile_fix.patch @@ -0,0 +1,48 @@ +--- a/zlib.h ++++ b/zlib.h +@@ -1563,12 +1563,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( + * without large file support, _LFS64_LARGEFILE must also be true + */ + #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +- ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); +- ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); +- ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); +- ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); +- ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); +- ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); ++ #define __zlib_largefile64 + #endif + + #if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 +@@ -1578,13 +1573,8 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( + # define gzoffset gzoffset64 + # define adler32_combine adler32_combine64 + # define crc32_combine crc32_combine64 +-# ifdef _LARGEFILE64_SOURCE +- ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); +- ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); +- ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); +- ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); +- ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); +- ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); ++# ifndef __zlib_largefile64 ++# define __zlib_largefile64 + # endif + #else + ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); +@@ -1595,6 +1585,15 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF( + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); + #endif + ++#ifdef __zlib_largefile64 ++ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); ++ ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); ++ ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); ++ ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); ++ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); ++ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); ++#endif ++ + /* hack for buggy compilers */ + #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) + struct internal_state {int dummy;}; |