[FFmpeg-devel] [PATCH] -D_POSIX_C_SOURCE=200112 and OS/2

Aurelien Jacobs aurel
Sat Aug 16 20:38:24 CEST 2008


M?ns Rullg?rd wrote:

> Dave Yeo <daveryeo at telus.net> writes:
> 
> > Hi, with -D_POSIX_C_SOURCE=200112 on OS/2 we get this error,
> >> gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> >> -I.
> > -I"/usr/src/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -fasm
> > -std=c99 -fomit-frame-pointer -g -Wall -Wno-switch
> > -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wcast-qual
> > -Wwrite-strings -O3 -fno-math-errno       -c -o
> > libavformat/os_support.o libavformat/os_support.c
> > libavformat/os_support.c: In function `poll':
> > libavformat/os_support.c:141: error: storage size of `tv' isn't known
> > libavformat/os_support.c:141: warning: unused variable `tv'
> >
> > Fix is to include sys/time.h as in one of the attached patches. Not
> > sure if checking for existence of sys/time.h is needed but the
> > autotools usually do check.
> 
> sys/time.h is a standard header, so there should be no need to check
> for it.  Besides, where would struct timeval be defined if the header
> doesn't exist?  If a system that defines it elsewhere turns up, we'll
> deal with it then.
> 
> > Index: libavformat/os_support.c
> > ===================================================================
> > --- libavformat/os_support.c	(revision 14783)
> > +++ libavformat/os_support.c	(working copy)
> > @@ -27,6 +27,7 @@
> >  #include "avformat.h"
> >  #include <unistd.h>
> >  #include <fcntl.h>
> > +#include <sys/time.h>
> >  #include "os_support.h"
> >  
> >  #ifdef CONFIG_NETWORK
> 
> OK

Applied.

Aurel




More information about the ffmpeg-devel mailing list