summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiet Brauer <piet@nerdishbynature.com>2016-02-25 18:15:02 +0800
committerPiet Brauer <piet@nerdishbynature.com>2016-03-11 10:33:37 +0800
commit0ac4a5ded41f274471bf0bc77bd07e43c9406ff3 (patch)
treefd62cb907cb6ed66d26740850d8a79e903ef9258
parent68ad3156a03202d9f5be9d45e935ead3047fc97a (diff)
downloadlibgit2-0ac4a5ded41f274471bf0bc77bd07e43c9406ff3.tar.gz
Check for __CLANG_INTTYPES_H
This fixes an issue in Xcode 7.3 in objective-git where we get the error "Include of non-modular header file in module". Not importing this header again fixes the issue.
-rw-r--r--include/git2/common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index c26030840..487247d75 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