[mcproxy] Add sourcefilter only for uClibc.
[feed/routing.git] / mcproxy / patches / 0003-uclibc-add-sourcefilter.patch
index 8e7832ca87c265f6c0073bc5f70a8c559b9b9b2a..7c4e90c60c1822abe06807a8f065f2d91808b5d2 100644 (file)
@@ -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 <numeric>
  #include <unistd.h>
  
++#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 <sys/param.h>
 +#include <sys/socket.h>
 +
-+#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)
 +{
 +
 +
 +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)
 +{