summaryrefslogtreecommitdiff
path: root/package/firefox/patches/patch-ipc_chromium_src_base_file_util_posix_cc
blob: 6721e44f8d8a060a0b16a3d1490e96ad49b9f38a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
--- mozilla-release.orig/ipc/chromium/src/base/file_util_posix.cc	2013-09-11 01:15:04.000000000 +0200
+++ mozilla-release/ipc/chromium/src/base/file_util_posix.cc	2013-10-23 16:28:38.000000000 +0200
@@ -8,13 +8,16 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <fnmatch.h>
-#ifndef ANDROID
+#ifndef __GLIBC__
+#define NO_FTS
+#endif
+#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 +124,7 @@ bool Delete(const FilePath& path, bool r
   if (!recursive)
     return (rmdir(path_str) == 0);
 
-#ifdef ANDROID
+#ifdef NO_FTS
   // XXX Need ftsless impl for bionic
   return false;
 #else
@@ -194,7 +197,7 @@ bool CopyDirectory(const FilePath& from_
     return false;
   }
 
-#ifdef ANDROID
+#ifdef NO_FTS
   // XXX Need ftsless impl for bionic
   return false;
 #else
@@ -415,7 +418,7 @@ bool CreateNewTempDirectory(const FilePa
     return false;
   tmpdir = tmpdir.Append(kTempFileName);
   std::string tmpdir_string = tmpdir.value();
-#ifdef ANDROID
+#ifdef NO_FTS
   char* dtemp = NULL;
 #else
   // this should be OK since mkdtemp just replaces characters in place
@@ -613,7 +616,7 @@ FileEnumerator::FileEnumerator(const Fil
 }
 
 FileEnumerator::~FileEnumerator() {
-#ifndef ANDROID
+#ifndef NO_FTS
   if (fts_)
     fts_close(fts_);
 #endif
@@ -625,7 +628,7 @@ void FileEnumerator::GetFindInfo(FindInf
   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 +639,7 @@ void FileEnumerator::GetFindInfo(FindInf
 // 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_) {