[FFmpeg-devel] stlport with ffmpeg: Issue with time_is_forbidden_due_to_security_issues

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Sep 13 00:13:44 CEST 2012

On 12 Sep 2012, at 21:02, Raymond Toy <rtoy at google.com> wrote:
> I'm currently building ffmpeg on Android and it pretty much works, but I've
> run into a problem with ffmpeg's time and stlport.
> In internal.h, ffmpeg has
> #undef time
> #define time time_is_forbidden_due_to_security_issues
> In various ffmpeg files, there is
> #include <time.h>
> When building ffmpeg on my Android system, the stlport version of time.h,
> which basically does something like
> #define _STLP_NATIVE_C_HEADER(header) <../include/header>
> #include _STLP_NATIVE_C_HEADER(time.h)
> Because of the #define in internal.h  this gets expanded as
> #include <../include/time_is_forbidden_due_to_security_issues.h>
> That file, of course, doesn't exist.  I assume the intent of the #undef and
> #define is to prevent uses of the function time, not to prevent including
> <time.h>. I'm currently getting around this be removing the #define from
> internal.h so that I can continue my development, but that is not the right
> solution.
> Any suggestions on how to solve this?

System headers should be included before FFmpeg headers for exactly this reason (with the exception of config.h, which we need to figure out whether we can include certain system headers, but should not cause that kind of issue).

More information about the ffmpeg-devel mailing list