If eglibc (2.1.5) is selected in openwrt instead of uclibc, transmission package will fail to build because the function definition exported by the libtransmission/fdlimit.c is lightly different than the function definition in fcntl.h that is installed by eglibc.
To get transmission build to work both with uclibc and eglibc, fdlimit.c needs to export function only if the build toolchain uses uclibc. This fixes also a openwrt bug https://dev.openwrt.org/ticket/8820 openwrt_trunk.git/staging_dir/ toolchain-mipsel_gcc-4.6-linaro_eglibc-2.15/lib/ gcc/mipsel-openwrt-linux-gnu/4.6.3/../../../../ mipsel-openwrt-linux-gnu/sys-include/bits/fcntl.h:316:12: error: conflicting types for 'fallocate64' fdlimit.c:30:14: note: previous declaration of 'fallocate64' was here Signed-off-by: Mika Laitio <[email protected]> --- .../patches/010_libtransmission_fallocate64_eglibc.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 net/transmission/patches/010_libtransmission_fallocate64_eglibc.patch diff --git a/net/transmission/patches/010_libtransmission_fallocate64_eglibc.patch b/net/transmission/patches/010_libtransmission_fallocate64_eglibc.patch new file mode 100644 index 0000000..15ae518 --- /dev/null +++ b/net/transmission/patches/010_libtransmission_fallocate64_eglibc.patch @@ -0,0 +1,13 @@ +diff -Naur transmission-2.61/libtransmission/fdlimit.c transmission-2.61-new/libtransmission/fdlimit.c +--- transmission-2.61/libtransmission/fdlimit.c 2012-07-24 04:59:03.429474697 +0300 ++++ transmission-2.61-new/libtransmission/fdlimit.c 2012-07-31 14:40:23.999860054 +0300 +@@ -25,7 +25,8 @@ + #include <fcntl.h> + #endif + +-#ifdef HAVE_FALLOCATE64 ++/* no need to define fallocate64 in glibc/eglibc case */ ++#if defined(__UCLIBC__) && (HAVE_FALLOCATE64) + /* FIXME can't find the right #include voodoo to pick up the declaration.. */ + extern int fallocate64( int fd, int mode, uint64_t offset, uint64_t len ); + #endif -- 1.7.10 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
