[FFmpeg-devel] [PATCH] Fix the build on OS X + clang
Sun Mar 7 11:37:09 CET 2010
On Sun, 7 Mar 2010, David Conrad wrote:
> On Mar 7, 2010, at 1:42 AM, M?ns Rullg?rd wrote:
> > David Conrad <lessen42 at gmail.com> writes:
> >> diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
> >> index c7c6fc3..7403653 100644
> >> --- a/libavformat/rtsp.c
> >> +++ b/libavformat/rtsp.c
> >> @@ -21,6 +21,7 @@
> >> /* needed by inet_aton() */
> >> #define _SVID_SOURCE
> >> +#define _DARWIN_C_SOURCE
> >> #include "libavutil/base64.h"
> >> #include "libavutil/avstring.h"
> > This doesn't belong in rtsp.c, nor does the _SVID_SOURCE. Maybe we
> > need to change something...
> Something like this?
This is ok with me, but I'd say wait for Ronalds opinion, too.
Generally, I think the inet_aton usage in rtsp.c should be changed to use
getaddrinfo (with suitable flags) instead.
It can't be removed from ff_getaddrinfo or resolve_host though, unless we
assume that gethostbyname always can handle numerical IP addresses (which
it can't according to standards, but I haven't seen a case in the wild
where it didn't support it).
More information about the ffmpeg-devel