Skip to content

Instantly share code, notes, and snippets.

@abcang
Created June 17, 2015 01:55
Show Gist options
  • Save abcang/3fb9c6b824015247c6d9 to your computer and use it in GitHub Desktop.
Save abcang/3fb9c6b824015247c6d9 to your computer and use it in GitHub Desktop.
vita-toolchain patch for Mac
diff --git endian-utils.h endian-utils.h
index 65bafe6..4d7a1f8 100644
--- endian-utils.h
+++ endian-utils.h
@@ -1,7 +1,7 @@
#ifndef ENDIAN_UTILS_H
#define ENDIAN_UTILS_H
-#ifndef __MINGW32__
+#if !defined(__MINGW32__) && !defined(__APPLE__)
#include <endian.h>
#else
/* Todo: make these definitions work on BE systems! */
diff --git vita-elf.c vita-elf.c
index de6e2f8..3c6d2ae 100644
--- vita-elf.c
+++ vita-elf.c
@@ -19,6 +19,13 @@
#define munmap(ptr, size) free(ptr)
#endif
+#ifdef __APPLE__
+#ifndef MAP_ANONYMOUS
+# define MAP_ANONYMOUS MAP_ANON
+#endif
+#endif
+
+
#include "vita-elf.h"
#include "vita-import.h"
#include "elf-defs.h"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment