[FFmpeg-devel] [PATCH] Only compile network-related code in cmdutils.c with network is enabled

Ramiro Polla ramiro
Tue May 6 21:12:13 CEST 2008


Aurelien Jacobs wrote:
> Ramiro Polla wrote:
> 
>> Diego Biurrun wrote:
>>> On Sun, May 04, 2008 at 03:50:05AM +0100, Ramiro Polla wrote:
>>>> $subj
>>> What problem does this solve?
>> ./configure --disable-network in MinGW
> 
> If your patch fixes --disable-network, then I guess the same problem
> arise with --enable-network, and your patch don't fix it.

I don't understand this.

> Your patch looks like a workaround much more than a fix.

Sorry, I really didn't explain very well. I just thought it would be 
easy for anyone to understand that if network is disabled, network code 
shouldn't be compiled. On --disable-network, no network headers are 
checked for in configure, so network.h is unreliable, and so is 
FF_NETERROR().

$ make
x86_64-pc-mingw32-gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I"/usrc/ffmpeg/build-w64mmx" 
-I"/usrc/ffmpeg/src" -I"/usrc/ffmpeg/src"/libavcodec 
-I"/usrc/ffmpeg/src"/libavdevice -I"/usrc/ffmpeg/src"/libavfilter 
-I"/usrc/ffmpeg/src"/libavformat -I"/usrc/ffmpeg/src"/libavutil 
-I"/usrc/ffmpeg/src"/libpostproc -I"/usrc/ffmpeg/src"/libswscale -g 
-Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization 
-Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual 
-Wwrite-strings -Wtype-limits -fno-math-errno -fno-signed-zeros       -c 
-o cmdutils.o /usrc/ffmpeg/src/cmdutils.c
cc1.exe: warning: -funit-at-a-time is required for inlining of functions 
that are only called once
In file included from E:/msys/1.0/usrc/ffmpeg/src/cmdutils.c:34:
E:/msys/1.0/usrc/ffmpeg/src/libavformat/network.h:33:24: error: 
sys/socket.h: No such file or directory
E:/msys/1.0/usrc/ffmpeg/src/libavformat/network.h:34:24: error: 
netinet/in.h: No such file or directory
E:/msys/1.0/usrc/ffmpeg/src/libavformat/network.h:35:19: error: netdb.h: 
No such file or directory
E:/msys/1.0/usrc/ffmpeg/src/cmdutils.c: In function 'print_error':
E:/msys/1.0/usrc/ffmpeg/src/cmdutils.c:184: error: 'EPROTONOSUPPORT' 
undeclared(first use in this function)
E:/msys/1.0/usrc/ffmpeg/src/cmdutils.c:184: error: (Each undeclared 
identifier is reported only once
E:/msys/1.0/usrc/ffmpeg/src/cmdutils.c:184: error: for each function it 
appearsin.)
make: *** [cmdutils.o] Error 1

Ramiro Polla




More information about the ffmpeg-devel mailing list