Merge "Apply work around b/19059885 to x86"
diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c
index 13b9887..fc2115e 100644
--- a/libc/stdio/stdio.c
+++ b/libc/stdio/stdio.c
@@ -86,5 +86,5 @@
 int
 __sclose(void *cookie)
 {
-	return TEMP_FAILURE_RETRY(close(((FILE *)cookie)->_file));
+	return close(((FILE *)cookie)->_file);
 }
diff --git a/linker/debugger.cpp b/linker/debugger.cpp
index 357fbdc..46c97af 100644
--- a/linker/debugger.cpp
+++ b/linker/debugger.cpp
@@ -205,15 +205,6 @@
 }
 
 static void send_debuggerd_packet(siginfo_t* info) {
-  if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0) {
-    // process has disabled core dumps and PTRACE_ATTACH, and does not want to be dumped.
-    // Honor that intention by not connecting to debuggerd and asking it
-    // to dump our internal state.
-    __libc_format_log(ANDROID_LOG_INFO, "libc",
-                      "Suppressing debuggerd output because prctl(PR_GET_DUMPABLE)==0");
-    return;
-  }
-
   // Mutex to prevent multiple crashing threads from trying to talk
   // to debuggerd at the same time.
   static pthread_mutex_t crash_mutex = PTHREAD_MUTEX_INITIALIZER;
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 6b6aae0..1155a36 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -2414,8 +2414,7 @@
   /* If /dev/null is not one of the stdio file descriptors, close it. */
   if (dev_null > 2) {
     TRACE("[ Closing /dev/null file-descriptor=%d]", dev_null);
-    status = TEMP_FAILURE_RETRY(close(dev_null));
-    if (status == -1) {
+    if (close(dev_null) == -1) {
       DL_ERR("close failed: %s", strerror(errno));
       return_value = -1;
     }
diff --git a/tests/libs/Android.mk b/tests/libs/Android.mk
index 4e275ed..15fa55c 100644
--- a/tests/libs/Android.mk
+++ b/tests/libs/Android.mk
@@ -355,10 +355,7 @@
 # -----------------------------------------------------------------------------
 libdl_test_df_1_global_src_files := dl_df_1_global.cpp
 libdl_test_df_1_global_ldflags := -Wl,-z,global
-# TODO (dimitry): x86* toolchain does not support -z global - switch to bfd
-ifeq ($(filter $(TARGET_ARCH),x86 x86_64),$(TARGET_ARCH))
-libdl_test_df_1_global_ldflags_target := -fuse-ld=bfd
-endif
+
 # TODO (dimitry): host ld.gold does not yet support -z global
 # remove this line once it is updated.
 libdl_test_df_1_global_ldflags_host := -fuse-ld=bfd