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

Raymond Toy rtoy at google.com
Wed Sep 12 21:02:20 CEST 2012

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

Any suggestions on how to solve this?


More information about the ffmpeg-devel mailing list