chromium/chromium-59.0.3071.86-ffmpeg-stdatomic.patch

18 lines
750 B
Diff
Raw Normal View History

2017-06-12 19:12:01 +00:00
diff -up chromium-59.0.3071.86/third_party/ffmpeg/libavutil/cpu.c.ffmpeg-stdatomic chromium-59.0.3071.86/third_party/ffmpeg/libavutil/cpu.c
--- chromium-59.0.3071.86/third_party/ffmpeg/libavutil/cpu.c.ffmpeg-stdatomic 2017-06-07 17:15:24.993945430 -0400
+++ chromium-59.0.3071.86/third_party/ffmpeg/libavutil/cpu.c 2017-06-07 17:18:41.625997601 -0400
@@ -17,7 +17,13 @@
*/
#include <stdint.h>
+// GCC 4.8 didn't have stdatomic, but was advertising it.
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58016
+#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ == 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ == 8)))
+#include <compat/atomics/gcc/stdatomic.h>
+#else
#include <stdatomic.h>
+#endif
#include "cpu.h"
#include "cpu_internal.h"