[FFmpeg-devel] [PATCH] avutil/opencl: don't include config.h

Wei Gao highgod0401 at gmail.com
Thu Jan 8 02:55:08 CET 2015


2015-01-08 8:42 GMT+08:00 Michael Niedermayer <michaelni at gmx.at>:

> On Wed, Jan 07, 2015 at 05:44:41PM -0300, James Almer wrote:
> > On 06/01/15 11:27 PM, Michael Niedermayer wrote:
> > > On Tue, Jan 06, 2015 at 01:56:01AM -0300, James Almer wrote:
> > >> It's not an installed header. Use libavutil/avconfig.h instead.
> > >
> > > assuming noone objects to this "hack" ... ugly but it should fix the
> > > build so ok
> >
> > Yes, i agree it's kinda ugly. What about this instead?
>
> LGTM but i dont have opencl setup so havnt tested it
>
Hi

diff --git a/libavutil/opencl.h b/libavutil/opencl.h
index 4655cba..0b7b8d4 100644
--- a/libavutil/opencl.h
+++ b/libavutil/opencl.h
@@ -32,11 +32,10 @@
 #ifndef LIBAVUTIL_OPENCL_H
 #define LIBAVUTIL_OPENCL_H

-#include "config.h"
-#if HAVE_CL_CL_H
-#include <CL/cl.h>
-#else
+#ifdef __APPLE__
 #include <OpenCL/cl.h>
+#else
+#include <CL/cl.h>
 #endif
 #include <stdint.h>
 #include "dict.h"
just this patch right? I can test it, but I don't have apple platform.

>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Let us carefully observe those good qualities wherein our enemies excel us
> and endeavor to excel them, by avoiding what is faulty, and imitating what
> is excellent in them. -- Plutarch
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>


More information about the ffmpeg-devel mailing list