catid / wirehair

Wirehair : O(N) Fountain Code for Large Data
http://wirehairfec.com
BSD 3-Clause "New" or "Revised" License
268 stars 56 forks source link

Recent ARM Neon detection change breaks IOS build #38

Closed jacobgorm closed 3 years ago

jacobgorm commented 3 years ago

commit 4e1c0390a74261080d80e7a51e194683d39833f1 forces the definition of LINUX_ARM if gf256.h, which in turns triggers unconditional inclusion of elf.h and other linux-specific header files, breaking build on IOS.

This change would seem to fix the issue:

diff --git a/gf256.h b/gf256.h
index adc3a27..8396a44 100644
--- a/gf256.h
+++ b/gf256.h
@@ -54,7 +54,9 @@
 // Platform/Architecture

 #if defined(__ARM_ARCH) || defined(__ARM_NEON) || defined(__ARM_NEON__)
-    #define LINUX_ARM
+    #if !defined IOS
+        #define LINUX_ARM
+    #endif
 #endif
catid commented 3 years ago

Thanks! I'll add that in now

catid commented 3 years ago

https://github.com/catid/wirehair/pull/39/files