summaryrefslogtreecommitdiffstats
path: root/runtime/native
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-01-09 15:16:16 -0800
committerElliott Hughes <enh@google.com>2015-01-09 15:16:16 -0800
commit0a18df82f4dea95b7398f8c934341fccbf04eeee (patch)
tree125c8285763ffc6d9c00b27eaed6a7aad5b317ee /runtime/native
parent553727e466942a10e11ee39dcb67e3f9562b471e (diff)
downloadart-0a18df82f4dea95b7398f8c934341fccbf04eeee.zip
art-0a18df82f4dea95b7398f8c934341fccbf04eeee.tar.gz
art-0a18df82f4dea95b7398f8c934341fccbf04eeee.tar.bz2
Clean up some #ifdefs.
Only the Mac doesn't have POSIX clocks. (And it still doesn't, a decade later.) glibc gained pthread_setname_np in 2.12. Only the Mac doesn't have prctl. Change-Id: I218e409f7e133736e15fb68e8a254cdc5799d667
Diffstat (limited to 'runtime/native')
-rw-r--r--runtime/native/dalvik_system_ZygoteHooks.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/native/dalvik_system_ZygoteHooks.cc b/runtime/native/dalvik_system_ZygoteHooks.cc
index 5f68d60..c056adc 100644
--- a/runtime/native/dalvik_system_ZygoteHooks.cc
+++ b/runtime/native/dalvik_system_ZygoteHooks.cc
@@ -26,7 +26,7 @@
#include "ScopedUtfChars.h"
#include "thread-inl.h"
-#if defined(HAVE_PRCTL)
+#if defined(__linux__)
#include <sys/prctl.h>
#endif
@@ -35,9 +35,9 @@
namespace art {
static void EnableDebugger() {
+#if defined(__linux__)
// To let a non-privileged gdbserver attach to this
// process, we must set our dumpable flag.
-#if defined(HAVE_PRCTL)
if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) {
PLOG(ERROR) << "prctl(PR_SET_DUMPABLE) failed for pid " << getpid();
}