summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2022-04-26 10:13:11 -0500
committerBrian Smith <brian@dbsoft.org>2022-04-26 10:19:04 -0500
commit3daf711085889bad1bd68651bc4e8790412ae105 (patch)
treef5b0e4c1befb320cdf158e1839ac5e273373087f /tools
parent7fe702603066e7f122d5dd66a3a1892ac7e06215 (diff)
downloaduxp-3daf711085889bad1bd68651bc4e8790412ae105.tar.gz
Issue #1829 - Revert “Issue #1751 -- Remove XP_MACOSX conditionals from the rest of the tree.”
This also removes some PP abuse and takes file entries out of PP when no longer needed without XP_MACOSX conditionals. This reverts commit 6f707bde95dab6998ac204f9ee6c925ee230c740.
Diffstat (limited to 'tools')
-rw-r--r--tools/fuzzing/libfuzzer/harness/LibFuzzerTestHarness.h8
-rw-r--r--tools/profiler/tasktracer/GeckoTaskTracer.cpp5
2 files changed, 13 insertions, 0 deletions
diff --git a/tools/fuzzing/libfuzzer/harness/LibFuzzerTestHarness.h b/tools/fuzzing/libfuzzer/harness/LibFuzzerTestHarness.h
index 70321a5748..6ac2344e31 100644
--- a/tools/fuzzing/libfuzzer/harness/LibFuzzerTestHarness.h
+++ b/tools/fuzzing/libfuzzer/harness/LibFuzzerTestHarness.h
@@ -193,6 +193,14 @@ static class ScopedXPCOM : public nsIDirectoryServiceProvider2
}
greD->Clone(getter_AddRefs(mGREBinD));
+#ifdef XP_MACOSX
+ nsAutoCString leafName;
+ mGREBinD->GetNativeLeafName(leafName);
+ if (leafName.Equals("Resources")) {
+ mGREBinD->SetNativeLeafName(NS_LITERAL_CSTRING("MacOS"));
+ }
+#endif
+
nsCOMPtr<nsIFile> copy = mGREBinD;
return copy.forget();
}
diff --git a/tools/profiler/tasktracer/GeckoTaskTracer.cpp b/tools/profiler/tasktracer/GeckoTaskTracer.cpp
index aefcb274ec..36d1bffc38 100644
--- a/tools/profiler/tasktracer/GeckoTaskTracer.cpp
+++ b/tools/profiler/tasktracer/GeckoTaskTracer.cpp
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -25,6 +26,10 @@
#include <unistd.h>
#include <sys/syscall.h>
#define gettid() static_cast<pid_t>(syscall(SYS_gettid))
+#elif defined(XP_MACOSX)
+#include <unistd.h>
+#include <sys/syscall.h>
+#define gettid() static_cast<pid_t>(syscall(SYS_thread_selfid))
#elif defined(LINUX)
#include <sys/types.h>
pid_t gettid();