From f6824b26ae06cc4e9964dd0d803676731ae7dbe0 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <enh@google.com>
Date: Thu, 28 Aug 2014 19:28:35 -0700
Subject: [PATCH] The host prebuilt glibc is 2.11, so remove workarounds for
 2.9.

Change-Id: I1072fcebc8b3018580a9d069fe6eca9c4e74e865
---
 tests/sys_socket_test.cpp | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/tests/sys_socket_test.cpp b/tests/sys_socket_test.cpp
index 0bde0243d..38ef68a99 100644
--- a/tests/sys_socket_test.cpp
+++ b/tests/sys_socket_test.cpp
@@ -23,13 +23,9 @@
 #include <fcntl.h>
 
 #if defined(__BIONIC__)
-  #define ACCEPT4_SUPPORTED 1
   #define RECVMMSG_SUPPORTED 1
   #define SENDMMSG_SUPPORTED 1
 #elif defined(__GLIBC_PREREQ)
-  #if __GLIBC_PREREQ(2, 9)
-    #define ACCEPT4_SUPPORTED 1
-  #endif
   #if __GLIBC_PREREQ(2, 12)
     #define RECVMMSG_SUPPORTED 1
   #endif
@@ -38,8 +34,6 @@
   #endif
 #endif
 
-#if defined(ACCEPT4_SUPPORTED) || defined(RECVMMSG_SUPPORTED) || defined(SENDMMSG_SUPPORTED)
-
 #define SOCK_PATH "test"
 
 static void* ConnectFn(void* data) {
@@ -105,18 +99,12 @@ static void RunTest(void (*test_fn)(struct sockaddr_un*, int),
 
   close(fd);
 }
-#endif
 
 TEST(sys_socket, accept4_error) {
-#if defined(ACCEPT4_SUPPORTED)
   ASSERT_EQ(-1, accept4(-1, NULL, NULL, 0));
   ASSERT_EQ(EBADF, errno);
-#else
-  GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
 }
 
-#if defined(ACCEPT4_SUPPORTED)
 static void TestAccept4(struct sockaddr_un* addr, int fd) {
   socklen_t len = sizeof(*addr);
   int fd_acc = accept4(fd, reinterpret_cast<struct sockaddr*>(addr), &len, SOCK_CLOEXEC);
@@ -127,14 +115,9 @@ static void TestAccept4(struct sockaddr_un* addr, int fd) {
 
   close(fd_acc);
 }
-#endif
 
 TEST(sys_socket, accept4_smoke) {
-#if defined(ACCEPT4_SUPPORTED)
   RunTest(TestAccept4, NULL);
-#else
-  GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif
 }
 
 #if defined(RECVMMSG_SUPPORTED)