Commit 1ddada422caf8e72ba97dca2568d2bf879fed5f2

Carlos Martín Nieto 2016-03-11T16:31:32

Merge pull request #3636 from nerdishbynature/fix-non-modular-header-in-module Don't include inttypes if compiling for Mac/iOS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/include/git2/common.h b/include/git2/common.h
index 4f43185..c1efee3 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -24,7 +24,8 @@
  GIT_BEGIN_DECL
 # include "inttypes.h"
  GIT_END_DECL
-#else
+/** This check is needed for importing this file in an iOS/OS X framework throws an error in Xcode otherwise.*/
+#elif !defined(__CLANG_INTTYPES_H)
 # include <inttypes.h>
 #endif