[FFmpeg-cvslog] compat: wrap math.h to avoid AIX-specific clashes
Luca Barbato
git at videolan.org
Fri Jul 5 13:17:50 CEST 2013
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Thu Jul 4 21:53:08 2013 +0200| [d3635f3ab0a234c830dfb4ddb9c6a4ea2677dace] | committer: Luca Barbato
compat: wrap math.h to avoid AIX-specific clashes
AIX defines a class() function in its math.h header without any
guard.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3635f3ab0a234c830dfb4ddb9c6a4ea2677dace
---
compat/aix/math.h | 14 ++++++++++++++
configure | 3 +++
2 files changed, 17 insertions(+)
diff --git a/compat/aix/math.h b/compat/aix/math.h
new file mode 100644
index 0000000..7c8134c
--- /dev/null
+++ b/compat/aix/math.h
@@ -0,0 +1,14 @@
+/*
+ * Workaround aix-specific class() function clashing with libav class usage
+ */
+
+#ifndef COMPAT_AIX_MATH_H
+#define COMPAT_AIX_MATH_H
+
+#define class class_in_math_h_causes_problems
+
+#include_next <math.h>
+
+#undef class
+
+#endif /* COMPAT_AIX_MATH_H */
diff --git a/configure b/configure
index db591e8..e1edbe6 100755
--- a/configure
+++ b/configure
@@ -3049,6 +3049,9 @@ enabled spic && enable_weak pic
# OS specific
case $target_os in
+ aix)
+ add_cppflags '-I\$(SRC_PATH)/compat/aix'
+ ;;
haiku)
prefix_default="/boot/common"
network_extralibs="-lnetwork"
More information about the ffmpeg-cvslog
mailing list