From b6faaf846e22941bf90ee366df87086b3e79cd19 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sat, 6 Jan 2018 14:18:38 +0000 Subject: net/libproxy: unbreak build with Clang 6 (C++14 by default) libproxy/test/get-pac-test.cpp:48:10: error: assigning to 'int' from incompatible type '__bind' ret = bind(m_sock, (sockaddr*)&addr, sizeof (struct sockaddr_in)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported by: antoine (via bug 224669) --- net/libproxy/files/patch-libproxy_test_get-pac-test.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 net/libproxy/files/patch-libproxy_test_get-pac-test.cpp (limited to 'net/libproxy/files/patch-libproxy_test_get-pac-test.cpp') diff --git a/net/libproxy/files/patch-libproxy_test_get-pac-test.cpp b/net/libproxy/files/patch-libproxy_test_get-pac-test.cpp new file mode 100644 index 000000000000..963f8f56b6f8 --- /dev/null +++ b/net/libproxy/files/patch-libproxy_test_get-pac-test.cpp @@ -0,0 +1,17 @@ +libc++ doesn't like "using namespace std" in C++11 + +libproxy/test/get-pac-test.cpp:48:10: error: assigning to 'int' from incompatible type '__bind' + ret = bind(m_sock, (sockaddr*)&addr, sizeof (struct sockaddr_in)); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +--- libproxy/test/get-pac-test.cpp.orig 2016-01-12 16:41:07 UTC ++++ libproxy/test/get-pac-test.cpp +@@ -45,7 +45,7 @@ class TestServer { + + setsockopt(m_sock, SOL_SOCKET, SO_REUSEADDR, &i, sizeof(i)); + +- ret = bind(m_sock, (sockaddr*)&addr, sizeof (struct sockaddr_in)); ++ ret = ::bind(m_sock, (sockaddr*)&addr, sizeof (struct sockaddr_in)); + assert(!ret); + + ret = listen(m_sock, 1); -- cgit v1.2.3