aboutsummaryrefslogtreecommitdiffstats
path: root/main/xulrunner/fix-ipc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/xulrunner/fix-ipc.patch')
-rw-r--r--main/xulrunner/fix-ipc.patch103
1 files changed, 103 insertions, 0 deletions
diff --git a/main/xulrunner/fix-ipc.patch b/main/xulrunner/fix-ipc.patch
new file mode 100644
index 0000000000..98590c9a02
--- /dev/null
+++ b/main/xulrunner/fix-ipc.patch
@@ -0,0 +1,103 @@
+--- mozilla-release/ipc.orig/chromium/src/base/debug_util_posix.cc
++++ mozilla-release/ipc/chromium/src/base/debug_util_posix.cc
+@@ -5,7 +5,7 @@
+ #include "build/build_config.h"
+ #include "base/debug_util.h"
+
+-#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID))
++#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && defined(__GLIBC__))
+
+ #include <errno.h>
+ #include <fcntl.h>
+--- mozilla-release/ipc.orig/chromium/src/base/file_util.h
++++ mozilla-release/ipc/chromium/src/base/file_util.h
+@@ -14,11 +14,16 @@
+ #include <windows.h>
+ #elif defined(ANDROID)
+ #include <sys/stat.h>
++#define NO_FTS
+ #elif defined(OS_POSIX)
+ #include <sys/types.h>
+-#include <fts.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
++#include <fts.h>
++#else
++#define NO_FTS
+ #endif
++#endif
+
+ #include <stdio.h>
+
+@@ -466,7 +471,7 @@
+ #if defined(OS_WIN)
+ WIN32_FIND_DATA find_data_;
+ HANDLE find_handle_;
+-#elif defined(ANDROID)
++#elif defined(NO_FTS)
+ void *fts_;
+ #elif defined(OS_POSIX)
+ FTS* fts_;
+--- mozilla-release/ipc.orig/chromium/src/base/file_util_posix.cc
++++ mozilla-release/ipc/chromium/src/base/file_util_posix.cc
+@@ -8,13 +8,13 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+-#ifndef ANDROID
++#ifndef NO_FTS
+ #include <fts.h>
+ #endif
+ #include <libgen.h>
+ #include <stdio.h>
+ #include <string.h>
+-#include <sys/errno.h>
++#include <errno.h>
+ #include <sys/mman.h>
+ #define _DARWIN_USE_64_BIT_INODE // Use 64-bit inode data structures
+ #include <sys/stat.h>
+@@ -121,7 +121,7 @@
+ if (!recursive)
+ return (rmdir(path_str) == 0);
+
+-#ifdef ANDROID
++#ifdef NO_FTS
+ // XXX Need ftsless impl for bionic
+ return false;
+ #else
+@@ -194,7 +194,7 @@
+ return false;
+ }
+
+-#ifdef ANDROID
++#ifdef NO_FTS
+ // XXX Need ftsless impl for bionic
+ return false;
+ #else
+@@ -613,7 +613,7 @@
+ }
+
+ FileEnumerator::~FileEnumerator() {
+-#ifndef ANDROID
++#ifndef NO_FTS
+ if (fts_)
+ fts_close(fts_);
+ #endif
+@@ -625,7 +625,7 @@
+ if (!is_in_find_op_)
+ return;
+
+-#ifndef ANDROID
++#ifndef NO_FTS
+ memcpy(&(info->stat), fts_ent_->fts_statp, sizeof(info->stat));
+ info->filename.assign(fts_ent_->fts_name);
+ #endif
+@@ -636,7 +636,7 @@
+ // large directories with many files this can be quite deep.
+ // TODO(erikkay) - get rid of this recursive pattern
+ FilePath FileEnumerator::Next() {
+-#ifdef ANDROID
++#ifdef NO_FTS
+ return FilePath();
+ #else
+ if (!is_in_find_op_) {