From 46068070314d56f66b681796635d38d497ef3bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Sun, 26 Mar 2017 20:51:14 +0200 Subject: [PATCH] lavfi/xbr: undef PI if defined This conflict with the DJGPP libc math.h which includes a PI macro (to M_PI). We cannot make DJGPP POSIX only (using -D_POSIX_SOURCE) to avoid this kind of symbols conflicts due to the lack of both posix_memalign and memalign (DJGPP non standard function) in that POSIX mode. We currently rely on memalign for aligned heap allocation. --- libavfilter/vf_xbr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavfilter/vf_xbr.c b/libavfilter/vf_xbr.c index 9893e0cc80..d0d51045cc 100644 --- a/libavfilter/vf_xbr.c +++ b/libavfilter/vf_xbr.c @@ -37,6 +37,10 @@ #define RED_BLUE_MASK 0x00FF00FF #define GREEN_MASK 0x0000FF00 +#ifdef PI +#undef PI +#endif + typedef int (*xbrfunc_t)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); typedef struct {