summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavutil_visibility.h
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-28 07:38:20 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-28 07:38:20 +0200
commit6b2bba06b433fb75979ab6daf7bbe8bc76c53875 (patch)
tree75803b4683889e6e0d2a3faef30415db3ff7b3ba /media/ffvpx/libavutil_visibility.h
parent72def35cd0cf3649b6d7ab72b66117df3e1c33fc (diff)
parentc75dae3ed21bfa5a8ae46cd83d18329af5bea05a (diff)
downloadUXP-6b2bba06b433fb75979ab6daf7bbe8bc76c53875.tar
UXP-6b2bba06b433fb75979ab6daf7bbe8bc76c53875.tar.gz
UXP-6b2bba06b433fb75979ab6daf7bbe8bc76c53875.tar.lz
UXP-6b2bba06b433fb75979ab6daf7bbe8bc76c53875.tar.xz
UXP-6b2bba06b433fb75979ab6daf7bbe8bc76c53875.zip
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into pm_url_1
Diffstat (limited to 'media/ffvpx/libavutil_visibility.h')
-rw-r--r--media/ffvpx/libavutil_visibility.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/media/ffvpx/libavutil_visibility.h b/media/ffvpx/libavutil_visibility.h
index a5cce0844..706aacdf3 100644
--- a/media/ffvpx/libavutil_visibility.h
+++ b/media/ffvpx/libavutil_visibility.h
@@ -9,6 +9,15 @@
#ifndef MOZILLA_AVUTIL_VISIBILITY_H
#define MOZILLA_AVUTIL_VISIBILITY_H
+// We need to preemptively include <stdlib.h> before anyone[1] has a chance
+// to include <limits.h>. We do this to avoid a Linux clang build error, in
+// -ffreestanding mode, which happens when limits.h defines MB_LEN_MAX to some
+// value that is different from what stdlib.h expects. If we include stdlib.h
+// before limits.h, then they don't get a chance to interact badly.
+//
+// [1] (e.g. libavutil/common.h, which is indirectly included by log.h below.)
+#include <stdlib.h>
+
#pragma GCC visibility push(default)
#include "libavutil/cpu.h"