[FFmpeg-trac] #1783(undetermined:new): libavutil contains file with the same name as a system header

FFmpeg trac at avcodec.org
Wed Oct 3 18:10:52 CEST 2012


#1783: libavutil contains file with the same name as a system header
-------------------------------------+-------------------------------------
             Reporter:  obucinac     |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1783>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list