[FFmpeg-devel] Error during configure process

Michel Bardiaux mbardiaux
Mon May 21 13:58:26 CEST 2007

Luca Abeni wrote:
> Hi Michel,
> Michel Bardiaux wrote:
> [...]
>>> /usr/include/linux/videodev2.h:438: error: syntax error before '*' token
>>> /usr/include/linux/videodev2.h:439: error: syntax error before '}' token
>>> /usr/include/linux/videodev2.h:810: error: field `win' has incomplete type
>>> make[1]: *** [v4l2.o] Error 1
>>> make[1]: Leaving directory `/usr/local/src/ffmpeg/libavformat'
>>> make: *** [lib] Error 2
>>> My fault or a bug?
>> ISTR you could try adding
>> #include <linux/compiler.h>
>> before
>> #include <linux/videodev2.h>
>> in v4l2.c. If that works, submit a patch.
> Are you sure including linux/compiler.h is ok for user-space 
> applications? Isn't it a "private" kernel header, which should not be 
> included from user space?
> I think some distributions do not even install it in /usr/include...
> I suspect the problem here is that the /usr/include/linux/videodev2.h 
> header is not properly "sanitized".

You are probably right on all counts. I write "probably" because I dont 
have a Suse9.3 on hand so I dont have the exact same versions of the 
headers, but based on what I see in Debian Etch, "probably" is 99.9999% 

Maybe this recommendation (not a patch!) would be slightly better:

#define __user
#include <linux/videodev2.h>

My priority was to fix the OPs problem. Admittedly the fix is just that, 
a kluge for a broken distro, and the usual policy is not to care about 
these. That said, if a major distro has put this broken header in the 
wild, it is likely to become a recurrent complaint, as frequent as the 
lrintf thing. So, what is the best strategy to reduce the pain this will 
be to support?

Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles

More information about the ffmpeg-devel mailing list