mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Put GetSocketPairs() in unnamed namespace
This avoids conflicting definitions of GetSocketPairs() in outer namespace when multiple such cc files are complied for one binary. PiperOrigin-RevId: 286243045
This commit is contained in:
@@ -10,6 +10,7 @@ exports_files(
|
||||
[
|
||||
"socket.cc",
|
||||
"socket_ip_loopback_blocking.cc",
|
||||
"socket_ip_tcp_loopback.cc",
|
||||
"socket_ipv4_udp_unbound_loopback.cc",
|
||||
"tcp_socket.cc",
|
||||
"udp_socket.cc",
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
namespace gvisor {
|
||||
namespace testing {
|
||||
namespace {
|
||||
|
||||
std::vector<SocketPairKind> GetSocketPairs() {
|
||||
return VecCat<SocketPairKind>(
|
||||
@@ -43,5 +44,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
BlockingIPSockets, BlockingSocketPairTest,
|
||||
::testing::ValuesIn(IncludeReversals(GetSocketPairs())));
|
||||
|
||||
} // namespace
|
||||
} // namespace testing
|
||||
} // namespace gvisor
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
namespace gvisor {
|
||||
namespace testing {
|
||||
namespace {
|
||||
|
||||
std::vector<SocketPairKind> GetSocketPairs() {
|
||||
return {
|
||||
@@ -34,5 +35,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
AllUnixDomainSockets, AllSocketPairTest,
|
||||
::testing::ValuesIn(IncludeReversals(GetSocketPairs())));
|
||||
|
||||
} // namespace
|
||||
} // namespace testing
|
||||
} // namespace gvisor
|
||||
|
||||
Reference in New Issue
Block a user