From: Álvaro Fernández Rojas Date: Sat, 5 Apr 2014 12:21:28 +0000 (+0200) Subject: [mcproxy] Add sourcefilter only for uClibc. X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=983c205bec7f70c29e6a662c0d21cbd1b1fa3680;hp=0e39fefd7f18cf4616b0cda8663693083727d9c7;p=feed%2Frouting.git [mcproxy] Add sourcefilter only for uClibc. --- diff --git a/mcproxy/patches/0003-uclibc-add-sourcefilter.patch b/mcproxy/patches/0003-uclibc-add-sourcefilter.patch index 8e7832c..7c4e90c 100644 --- a/mcproxy/patches/0003-uclibc-add-sourcefilter.patch +++ b/mcproxy/patches/0003-uclibc-add-sourcefilter.patch @@ -1,17 +1,19 @@ --- a/mcproxy/src/utils/mc_socket.cpp +++ b/mcproxy/src/utils/mc_socket.cpp -@@ -37,6 +37,8 @@ +@@ -37,6 +37,10 @@ #include #include ++#ifdef __UCLIBC__ +#include "sourcefilter.cpp" ++#endif /* __UCLIBC__ */ + std::string ipAddrResolver(std::string ipAddr) { std::string str[][2] = { --- /dev/null +++ b/mcproxy/src/utils/sourcefilter.cpp -@@ -0,0 +1,168 @@ +@@ -0,0 +1,165 @@ +/* Get source filter. Linux version. + Copyright (C) 2004-2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -41,9 +43,6 @@ +#include +#include + -+#define getsourcefilter getsourcefilter2 -+#define setsourcefilter setsourcefilter2 -+ +static const struct +{ + int sol; @@ -95,7 +94,7 @@ + + +int -+getsourcefilter2 (int s, uint32_t interface, const struct sockaddr *group, ++getsourcefilter (int s, uint32_t interface, const struct sockaddr *group, + socklen_t grouplen, uint32_t *fmode, uint32_t *numsrc, + struct sockaddr_storage *slist) +{ @@ -144,7 +143,7 @@ + + +int -+setsourcefilter2 (int s, uint32_t interface, const struct sockaddr *group, ++setsourcefilter (int s, uint32_t interface, const struct sockaddr *group, + socklen_t grouplen, uint32_t fmode, uint32_t numsrc, + const struct sockaddr_storage *slist) +{