aboutsummaryrefslogtreecommitdiff
path: root/mDNSPosix
diff options
context:
space:
mode:
authorChristopher Lane <lanechr@google.com>2014-02-19 17:56:09 -0800
committerChristopher Lane <lanechr@google.com>2014-02-19 17:56:09 -0800
commit2fd068f98fa215f2681ddbe89fd7404d53218be3 (patch)
tree4d90447342ee8d1cd0074d2fd4bc3c6aec39356a /mDNSPosix
parentc46f53f5e072f23051c4eedef730386f7634dc11 (diff)
downloadmdnsresponder-2fd068f98fa215f2681ddbe89fd7404d53218be3.tar.gz
Always use SO_REUSEADDR, never SO_REUSEPORT
We need to build mdnsd for 3.4.x and 3.10 while only using one set of kernel headers, so for 3.4.x SO_REUSEPORT is set in the headers but isn't actually supported in the kernel. Since this is UDP, SO_REUSEPORT doesn't get much over SO_REUSEADDR, so just always use SO_REUSEADDR. Bug: 12995869 Change-Id: Idce363c3bb3b53f7f4bd3694a2d4f6350a981e0c
Diffstat (limited to 'mDNSPosix')
-rwxr-xr-xmDNSPosix/mDNSPosix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c
index ee0b335..f6358e3 100755
--- a/mDNSPosix/mDNSPosix.c
+++ b/mDNSPosix/mDNSPosix.c
@@ -65,6 +65,11 @@
#include "mDNSUNP.h"
#include "GenLinkedList.h"
+// Disallow SO_REUSEPORT on Android because we use >3.9 kernel headers to build binaries targeted to 3.4.x.
+#ifdef __ANDROID__
+#undef SO_REUSEPORT
+#endif
+
// ***************************************************************************
// Structures