[vlc-commits] include/vlc_fixups.h: uClibc needs __STDC_FORMAT_MACROS
Bernd Kuhls
git at videolan.org
Sat Apr 2 18:56:06 CEST 2016
vlc | branch: master | Bernd Kuhls <bernd.kuhls at t-online.de> | Sat Apr 2 18:18:49 2016 +0200| [f30e0d9eda38591b970295f441f6517aa2f0d32c] | committer: Jean-Baptiste Kempf
include/vlc_fixups.h: uClibc needs __STDC_FORMAT_MACROS
Fixes compile error with gcc-4.9.3:
CXX demux/mkv/libmkv_plugin_la-util.lo
In file included from ../include/vlc_common.h:893:0,
from demux/mkv/mkv.hpp:38,
from demux/mkv/util.cpp:24:
demux/mkv/util.cpp: In function 'void handle_real_audio(demux_t*, mkv_track_t*, block_t*, mtime_t)':
demux/mkv/util.cpp:192:79: error: expected ')' before 'PRId64'
msg_Dbg( p_demux, "discard non-key preroll block in track %d at%" PRId64,
^
Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f30e0d9eda38591b970295f441f6517aa2f0d32c
---
configure.ac | 2 +-
include/vlc_fixups.h | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5b493f8..dfcc075 100644
--- a/configure.ac
+++ b/configure.ac
@@ -793,7 +793,7 @@ dnl BSD
AC_CHECK_HEADERS([netinet/udplite.h sys/param.h sys/mount.h])
dnl GNU/Linux
-AC_CHECK_HEADERS([getopt.h linux/dccp.h linux/magic.h mntent.h sys/eventfd.h])
+AC_CHECK_HEADERS([features.h getopt.h linux/dccp.h linux/magic.h mntent.h sys/eventfd.h])
dnl MacOS
AC_CHECK_HEADERS([xlocale.h])
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 95542a1..39581ff 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -26,9 +26,14 @@
#ifndef LIBVLC_FIXUPS_H
# define LIBVLC_FIXUPS_H 1
+/* needed to detect uClibc */
+#ifdef HAVE_FEATURES_H
+#include <features.h>
+#endif
+
/* C++11 says there's no need to define __STDC_*_MACROS when including
* inttypes.h and stdint.h. */
-#if defined (__cplusplus) && (!defined(HAVE_CXX11) || defined(__MINGW32__))
+#if defined (__cplusplus) && (!defined(HAVE_CXX11) || defined(__MINGW32__) || defined(__UCLIBC__))
# ifndef __STDC_FORMAT_MACROS
# define __STDC_FORMAT_MACROS 1
# endif
More information about the vlc-commits
mailing list