Manually define `MAP_ANONYMOUS` when necessary.

Change-Id: I65b3fac08d98ad3182d1922d7af60ae9424152a5
diff --git a/test/test-utils.cc b/test/test-utils.cc
index 0ded8a1..5f7324b 100644
--- a/test/test-utils.cc
+++ b/test/test-utils.cc
@@ -33,6 +33,13 @@
 
 namespace vixl {
 
+// BSD uses `MAP_ANON` instead of the Linux `MAP_ANONYMOUS`. The `MAP_ANONYMOUS`
+// alias should generally be available, but is not always, so define it manually
+// if necessary.
+#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+
 ExecutableMemory::ExecutableMemory(size_t size)
   : size_(size),
     buffer_(mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,