patch-ipc_chromium_src_base_file_util_posix_cc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --- mozilla-release.orig/ipc/chromium/src/base/file_util_posix.cc 2013-12-05 17:07:35.000000000 +0100
  2. +++ mozilla-release/ipc/chromium/src/base/file_util_posix.cc 2014-01-02 14:53:44.000000000 +0100
  3. @@ -8,13 +8,16 @@
  4. #include <errno.h>
  5. #include <fcntl.h>
  6. #include <fnmatch.h>
  7. -#ifndef ANDROID
  8. +#ifndef __GLIBC__
  9. +#define NO_FTS
  10. +#endif
  11. +#ifndef NO_FTS
  12. #include <fts.h>
  13. #endif
  14. #include <libgen.h>
  15. #include <stdio.h>
  16. #include <string.h>
  17. -#include <sys/errno.h>
  18. +#include <errno.h>
  19. #include <sys/mman.h>
  20. #define _DARWIN_USE_64_BIT_INODE // Use 64-bit inode data structures
  21. #include <sys/stat.h>
  22. @@ -67,7 +70,7 @@ bool Delete(const FilePath& path, bool r
  23. if (!recursive)
  24. return (rmdir(path_str) == 0);
  25. -#ifdef ANDROID
  26. +#ifdef NO_FTS
  27. // XXX Need ftsless impl for bionic
  28. return false;
  29. #else
  30. @@ -140,7 +143,7 @@ bool CopyDirectory(const FilePath& from_
  31. return false;
  32. }
  33. -#ifdef ANDROID
  34. +#ifdef NO_FTS
  35. // XXX Need ftsless impl for bionic
  36. return false;
  37. #else
  38. @@ -333,7 +336,7 @@ bool CreateNewTempDirectory(const FilePa
  39. return false;
  40. tmpdir = tmpdir.Append(kTempFileName);
  41. std::string tmpdir_string = tmpdir.value();
  42. -#ifdef ANDROID
  43. +#ifdef NO_FTS
  44. char* dtemp = NULL;
  45. #else
  46. // this should be OK since mkdtemp just replaces characters in place