From bd2797de1538c58232cffd8ec04a23fea23114f9 Mon Sep 17 00:00:00 2001
From: pwpiwi <pwpiwi@users.noreply.github.com>
Date: Thu, 23 Mar 2017 06:42:56 +0100
Subject: [PATCH] fix: compile issue on RasPi
 (http://www.proxmark.org/forum/viewtopic.php?id=4678)

---
 common/crapto1/crapto1.h | 2 +-
 common/crapto1/crypto1.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/crapto1/crapto1.h b/common/crapto1/crapto1.h
index e718b1f2..96ab96a2 100644
--- a/common/crapto1/crapto1.h
+++ b/common/crapto1/crapto1.h
@@ -25,7 +25,7 @@ extern "C" {
 #endif
 
 struct Crypto1State {uint32_t odd, even;};
-#if defined(__arm__)
+#if defined(__arm__) && !defined(__linux__) && !defined(_WIN32) && !defined(__APPLE__)		// bare metal ARM Proxmark lacks malloc()/free()
 void crypto1_create(struct Crypto1State *s, uint64_t key);
 #else
 struct Crypto1State *crypto1_create(uint64_t key);
diff --git a/common/crapto1/crypto1.c b/common/crapto1/crypto1.c
index a3f64a9f..61f6fe66 100644
--- a/common/crapto1/crypto1.c
+++ b/common/crapto1/crypto1.c
@@ -23,7 +23,7 @@
 #define SWAPENDIAN(x)\
 	(x = (x >> 8 & 0xff00ff) | (x & 0xff00ff) << 8, x = x >> 16 | x << 16)
 
-#if defined(__arm__) && !defined(__linux__) && !defined(_WIN32)			// bare metal ARM lacks malloc()/free()
+#if defined(__arm__) && !defined(__linux__) && !defined(_WIN32) && !defined(__APPLE__)		// bare metal ARM Proxmark lacks malloc()/free()
 void crypto1_create(struct Crypto1State *s, uint64_t key)
 {
 	int i;
-- 
2.39.5