[FFmpeg-cvslog] r14754 - trunk/configure
D
lessen42
Thu Aug 14 23:57:25 CEST 2008
On Aug 14, 2008, at 7:40 AM, michael wrote:
> Author: michael
> Date: Thu Aug 14 13:40:14 2008
> New Revision: 14754
>
> Log:
> Add -D_POSIX_C_SOURCE=200112 to cflags.
This breaks on Mac OS X as such:
gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -
I"/Users/lessen/ffmpeg" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -
pipe -force_cpusubtype_ALL -Wno-sign-compare -mdynamic-no-pic -fomit-
frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -
Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-
sign -Wcast-qual -Wwrite-strings -O3 -fno-math-errno -c -o
libavformat/os_support.o /Users/davedc/Projects/ffmpeg-git/libavformat/
os_support.c
/Users/davedc/Projects/ffmpeg-git/libavformat/os_support.c: In
function ?resolve_host?:
/Users/davedc/Projects/ffmpeg-git/libavformat/os_support.c:63:
warning: implicit declaration of function ?inet_aton?
/Users/davedc/Projects/ffmpeg-git/libavformat/os_support.c:67: error:
?struct hostent? has no member named ?h_addr?
make: *** [libavformat/os_support.o] Error 1
It seems the problem is that the h_addr compatibilty macro and
inet_aton are not defined at all in the 10.4 headers if
_POSIX_C_SOURCE is. 10.5 headers define them when _POSIX_C_SOURCE is
defined only if _DARWIN_C_SOURCE is also defined.
Apparently this was a deliberate change from 10.3 which supposedly
does not have these conditions, as evidenced by lynx having the same
problem over 3 years ago ( http://www.mail-archive.com/lynx-dev at nongnu.org/msg00950.html
)
Two possible solutions I see: don't define _POSIX_C_SOURCE on Darwin
or use h_addr_list[0] rather than h_addr.
More information about the ffmpeg-cvslog
mailing list