summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/socket_ip_udp_loopback.cc
diff options
context:
space:
mode:
authorJay Zhuang <jayzhuang@google.com>2020-01-30 14:06:54 -0800
committergVisor bot <gvisor-bot@google.com>2020-01-30 14:17:58 -0800
commit9988cf2eeff596ce519046d80c54d09166f7d84b (patch)
treeb70a3be131a86a886766a1e9d4213b6b3680e3c8 /test/syscalls/linux/socket_ip_udp_loopback.cc
parentd62362f63fb86591832ee8e36e833df20b8218f6 (diff)
Wrap all GetSocketPairs() in unnamed namespaces
This avoids conflicting definitions of GetSocketPairs() in outer namespace when multiple such cc files are complied for one binary. PiperOrigin-RevId: 292420885
Diffstat (limited to 'test/syscalls/linux/socket_ip_udp_loopback.cc')
-rw-r--r--test/syscalls/linux/socket_ip_udp_loopback.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/syscalls/linux/socket_ip_udp_loopback.cc b/test/syscalls/linux/socket_ip_udp_loopback.cc
index 1df74a348..c7fa44884 100644
--- a/test/syscalls/linux/socket_ip_udp_loopback.cc
+++ b/test/syscalls/linux/socket_ip_udp_loopback.cc
@@ -23,6 +23,7 @@
namespace gvisor {
namespace testing {
+namespace {
std::vector<SocketPairKind> GetSocketPairs() {
return {
@@ -44,5 +45,6 @@ INSTANTIATE_TEST_SUITE_P(
AllUDPSockets, UDPSocketPairTest,
::testing::ValuesIn(IncludeReversals(GetSocketPairs())));
+} // namespace
} // namespace testing
} // namespace gvisor