[mcproxy] Add sourcefilter only for uClibc.
This commit is contained in:
parent
0e39fefd7f
commit
983c205bec
1 changed files with 6 additions and 7 deletions
|
@ -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)
|
||||
+{
|
||||
|
@ -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)
|
||||
+{
|
||||
|
|
Loading…
Reference in a new issue