Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2628)

Unified Diff: base/mac/scoped_mach_vm.h

Issue 273183003: Fix iOS some more after r269483. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/mac/scoped_mach_vm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/scoped_mach_vm.h
diff --git a/base/mac/scoped_mach_vm.h b/base/mac/scoped_mach_vm.h
index c70c14f1a78eddffc52c799aac30c3cdd3d11023..b9306932bdfb7f60872b3735ba092fa593348ecc 100644
--- a/base/mac/scoped_mach_vm.h
+++ b/base/mac/scoped_mach_vm.h
@@ -6,13 +6,24 @@
#define BASE_MAC_SCOPED_MACH_VM_H_
#include <mach/mach.h>
-#include <mach/mach_vm.h>
#include <algorithm>
#include "base/base_export.h"
#include "base/basictypes.h"
#include "base/logging.h"
+#include "build/build_config.h"
+
+#if !defined(OS_IOS)
+#include <mach/mach_vm.h>
+#else // OS_IOS
+// mach_vm.h is forbidden on iOS, but the routines in vm_map.h are a suitable
+// substitute.
+#include <mach/vm_map.h>
+#define mach_vm_address_t vm_address_t
+#define mach_vm_size_t vm_size_t
+#define mach_vm_deallocate vm_deallocate
+#endif // OS_IOS
// Use ScopedMachVM to supervise ownership of pages in the current process
// through the Mach VM subsystem. Pages allocated with mach_vm_allocate can be
@@ -91,4 +102,10 @@ class BASE_EXPORT ScopedMachVM {
} // namespace mac
} // namespace base
+#if defined(OS_IOS)
+#undef mach_vm_address_t
+#undef mach_vm_size_t
+#undef mach_vm_deallocate
+#endif // OS_IOS
+
#endif // BASE_MAC_SCOPED_MACH_VM_H_
« no previous file with comments | « no previous file | base/mac/scoped_mach_vm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698