Fix wrong conditional inclusion of inttypes.h
authorReynaldo H. Verdejo Pinochet <reynaldo@collabora.com>
Wed, 4 Jan 2012 16:16:12 +0000 (13:16 -0300)
committerJason Garrett-Glaser <jason@x264.com>
Thu, 12 Jan 2012 20:04:45 +0000 (12:04 -0800)
inttypes.h is required by encoder/ratecontrol.c for SCNxxx macros, and HAVE_STDINT_H does not imply having inttypes.h.
stdint.h is a subset of inttypes.h, but this isn't enough for x264.
This change fixes building x264 with Android's toolchain.

common/osdep.h

index dbb0937..a55b69d 100644 (file)
 #define _FILE_OFFSET_BITS 64
 #include <stdio.h>
 #include <sys/stat.h>
+#include <inttypes.h>
 
 #include "config.h"
 
-#if HAVE_STDINT_H
-#include <stdint.h>
-#else
-#include <inttypes.h>
-#endif
-
 #if !HAVE_LOG2F
 #define log2f(x) (logf(x)/0.693147180559945f)
 #define log2(x) (log(x)/0.693147180559945)