File rename-ucontext-to_ucontext_t.patch of Package firefox45esr
Index: mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc
===================================================================
--- mozilla.orig/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc
+++ mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc
@@ -393,10 +393,10 @@ bool ExceptionHandler::HandleSignal(int
}
CrashContext context;
memcpy(&context.siginfo, info, sizeof(siginfo_t));
- memcpy(&context.context, uc, sizeof(struct ucontext));
+ memcpy(&context.context, uc, sizeof(struct ucontext_t));
#if !defined(__ARM_EABI__)
// FP state is not part of user ABI on ARM Linux.
- struct ucontext *uc_ptr = (struct ucontext*)uc;
+ struct ucontext_t *uc_ptr = (struct ucontext_t*)uc;
if (uc_ptr->uc_mcontext.fpregs) {
memcpy(&context.float_state,
uc_ptr->uc_mcontext.fpregs,
@@ -420,7 +420,7 @@ bool ExceptionHandler::SimulateSignalDel
// ExceptionHandler::HandleSignal().
siginfo.si_code = SI_USER;
siginfo.si_pid = getpid();
- struct ucontext context;
+ struct ucontext_t context;
getcontext(&context);
return HandleSignal(sig, &siginfo, &context);
}
Index: mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.h
===================================================================
--- mozilla.orig/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.h
+++ mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.h
@@ -189,7 +189,7 @@ class ExceptionHandler {
struct CrashContext {
siginfo_t siginfo;
pid_t tid; // the crashing thread.
- struct ucontext context;
+ struct ucontext_t context;
#if !defined(__ARM_EABI__)
// #ifdef this out because FP state is not part of user ABI for Linux ARM.
struct _libc_fpstate float_state;
Index: mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/minidump_writer.cc
===================================================================
--- mozilla.orig/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/minidump_writer.cc
+++ mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/minidump_writer.cc
@@ -173,7 +173,7 @@ void CPUFillFromThreadInfo(MDRawContextX
// Juggle an x86 ucontext into minidump format
// out: the minidump structure
// info: the collection of register structures.
-void CPUFillFromUContext(MDRawContextX86 *out, const ucontext *uc,
+void CPUFillFromUContext(MDRawContextX86 *out, const ucontext_t *uc,
const struct _libc_fpstate* fp) {
const greg_t* regs = uc->uc_mcontext.gregs;
@@ -273,7 +273,7 @@ void CPUFillFromThreadInfo(MDRawContextA
my_memcpy(&out->flt_save.xmm_registers, &info.fpregs.xmm_space, 16 * 16);
}
-void CPUFillFromUContext(MDRawContextAMD64 *out, const ucontext *uc,
+void CPUFillFromUContext(MDRawContextAMD64 *out, const ucontext_t *uc,
const struct _libc_fpstate* fpregs) {
const greg_t* regs = uc->uc_mcontext.gregs;
@@ -340,7 +340,7 @@ void CPUFillFromThreadInfo(MDRawContextA
#endif
}
-void CPUFillFromUContext(MDRawContextARM* out, const ucontext* uc,
+void CPUFillFromUContext(MDRawContextARM* out, const ucontext_t* uc,
const struct _libc_fpstate* fpregs) {
out->context_flags = MD_CONTEXT_ARM_FULL;
@@ -1479,7 +1479,7 @@ class MinidumpWriter {
const int fd_; // File descriptor where the minidum should be written.
const char* path_; // Path to the file where the minidum should be written.
- const struct ucontext* const ucontext_; // also from the signal handler
+ const struct ucontext_t* const ucontext_; // also from the signal handler
const struct _libc_fpstate* const float_state_; // ditto
LinuxDumper* dumper_;
MinidumpFileWriter minidump_writer_;
Index: mozilla/xpcom/io/nsLocalFileUnix.cpp
===================================================================
--- mozilla.orig/xpcom/io/nsLocalFileUnix.cpp
+++ mozilla/xpcom/io/nsLocalFileUnix.cpp
@@ -78,6 +78,22 @@ static nsresult MacErrorMapper(OSErr inE
#include "nsTraceRefcnt.h"
#include "nsHashKeys.h"
+unsigned int antlarr_major (dev_t __dev)
+ {
+ unsigned int __major;
+ __major = ((__dev & (dev_t) 0x00000000000fff00u) >> 8);
+ __major |= ((__dev & (dev_t) 0xfffff00000000000u) >> 32);
+ return __major;
+ }
+
+unsigned int antlarr_minor (dev_t __dev)
+ {
+ unsigned int __minor;
+ __minor = ((__dev & (dev_t) 0x00000000000000ffu) >> 0);
+ __minor |= ((__dev & (dev_t) 0x00000ffffff00000u) >> 12);
+ return __minor;
+ }
+
using namespace mozilla;
#define ENSURE_STAT_CACHE() \
@@ -1393,8 +1409,8 @@ nsLocalFile::GetDiskSpaceAvailable(int64
}
nsCString deviceName;
- if (!GetDeviceName(major(mCachedStat.st_dev),
- minor(mCachedStat.st_dev),
+ if (!GetDeviceName(antlarr_major(mCachedStat.st_dev),
+ antlarr_minor(mCachedStat.st_dev),
deviceName)) {
return NS_OK;
}