shithub: libvpx

Download patch

ref: 1bec0c5a7e885ec792f6bb658eb3f34ad8f37b15
parent: e2b451d9e399d0d72a24f288b8c0aa0456a59dda
author: Brion Vibber <[email protected]>
date: Mon May 2 23:03:59 EDT 2016

Skip inttypes.h on Darwin

When building a dynamic framework with Swift compatibility, can't
include any headers that aren't in another module or you get an
error like this from Xcode on the including project:

  Include of non-modular header inside framework

For some reason the system inttypes.h is not in a module, unlike
other standard C library headers... but it doesn't seem to be
actually needed on Darwin, so removing it doesn't appear to
be a problem.

Change-Id: I11d264483c54feefd9d2edf573afaef34ddcd0f2

--- a/vpx/vpx_integer.h
+++ b/vpx/vpx_integer.h
@@ -68,7 +68,12 @@
 #if defined(_MSC_VER) && _MSC_VER < 1800
 #define PRId64 "I64d"
 #else
+#if defined(__APPLE__)
+// When building dynamic frameworks with Swift compatibility, module maps
+// do not allow us to include the system's inttypes.h.
+#else
 #include <inttypes.h>
+#endif
 #endif
 
 #endif  // VPX_VPX_INTEGER_H_