id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc	blockedby	blocking	reproduced	analyzed
1783	libavutil contains file with the same name as a system header	obucinac		"Since 1.0 release, there is a file named time.h in libavutil, which is the same name as a system header. This may break custom builds, because (depending on -I flags) #include <time.h> in libavutils/parseutils.c may include:

libavutil/time.h

instead of

/usr/include/time.h 

I am working with Android NDK and Android build system and this is probably out of your fixing scope, since Android NDK build is not officially supported (and one can always set invalid compiler flags). However, I would appreciate if you consider renaming a header with the same name as a system header. The problem is that Android build system adds additional -I flags beside those defined in Android makefile, and this cant be prevented.


How to reproduce:

It is reproducible with any compiler

cd ffmpeg
./configure

This works
gcc -I . -c libavutil/parseutils.c

This fails
gcc -I . -I libavutil -c libavutil/parseutils.c

libavutil/parseutils.h:158:64: warning: ‘struct tm’ declared inside parameter list
libavutil/parseutils.h:171:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘av_timegm’
libavutil/parseutils.c:441:64: warning: ‘struct tm’ declared inside parameter list
libavutil/parseutils.c:441:7: error: conflicting types for ‘av_small_strptime’
libavutil/parseutils.h:158:7: note: previous declaration of ‘av_small_strptime’ was here
"	defect	closed	normal	undetermined	unspecified	wontfix					0	0
