diff --git a/OLMKit.podspec b/OLMKit.podspec
index 86bc611cbf7add24e567f989fc40ad29251e60b8..a1cc74c54e40d976c31a71290e220eb1b09bf765 100644
--- a/OLMKit.podspec
+++ b/OLMKit.podspec
@@ -30,7 +30,10 @@ Pod::Spec.new do |s|
     :tag => s.version.to_s 
   }
     
-  s.source_files = "xcode/OLMKit/*.{h,m}", "include/**/*.{h,hh}", "src/*.{c,cpp}", "lib/ed25519/**/*.{h,c}", "lib/crypto-algorithms/sha256.c",  "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c"
+  s.source_files = "xcode/OLMKit/*.{h,m}", "include/**/*.{h,hh}", "src/*.{c,cpp}", "lib/crypto-algorithms/sha256.c",  "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c"
+  
+  # Those files (including .c) are included by ed25519.c. We do not want to compile them twice
+  s.preserve_paths = "lib/ed25519/**/*.{h,c}"
   
   s.library = "c++"