void-packages/srcpkgs/icecat/patches/fix-tools.patch
Jürgen Buchmüller 5163d0e87c
icecat: update to 60.7.0
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
2019-06-04 09:43:48 +02:00

51 lines
1.5 KiB
Diff

--- tools/profiler/core/platform.h
+++ tools/profiler/core/platform.h
@@ -29,6 +29,8 @@
#ifndef TOOLS_PLATFORM_H_
#define TOOLS_PLATFORM_H_
+#include <sys/types.h>
+
#include <stdint.h>
#include <math.h>
#include "MainThreadUtils.h"
--- tools/profiler/lul/LulElf.cpp 2019-01-24 18:31:42.000000000 +0100
+++ - 2019-01-31 11:19:53.198257189 +0100
@@ -460,9 +460,9 @@
// last slash, or the whole filename if there are no slashes.
string BaseFileName(const string& filename) {
// Lots of copies! basename's behavior is less than ideal.
- char* c_filename = strdup(filename.c_str());
- string base = basename(c_filename);
- free(c_filename);
+ const char* c_filename = filename.c_str();
+ const char *p = strrchr(c_filename, '/');
+ string base = p ? p+1 : c_filename;
return base;
}
--- tools/profiler/core/platform-linux-android.cpp 2019-01-24 18:31:43.000000000 +0100
+++ - 2019-01-31 11:23:07.911772317 +0100
@@ -253,7 +253,11 @@
// Request profiling signals.
struct sigaction sa;
+#if defined(GP_ARCH_arm)
+ sa.sa_sigaction = SigprofHandler;
+#else
sa.sa_sigaction = MOZ_SIGNAL_TRAMPOLINE(SigprofHandler);
+#endif
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART | SA_SIGINFO;
if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) {
@@ -497,8 +497,10 @@
ucontext_t sSyncUContext;
void Registers::SyncPopulate() {
+#if defined(__GLIBC__)
if (!getcontext(&sSyncUContext)) {
PopulateRegsFromContext(*this, &sSyncUContext);
}
+#endif
}
#endif