diff options
author | Dave Yeo <dave.r.yeo@gmail.com> | 2013-08-14 15:22:13 -0700 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-08-15 10:31:43 +0300 |
commit | c3386bd5b4d3662f94e902a0fe3e9e869e29967d (patch) | |
tree | c21beb2c49c073106da067c22782b297069c88db /libavformat/rtpproto.c | |
parent | b56fc18b20d62c3d2a134b53738deaabfd491e89 (diff) | |
download | ffmpeg-c3386bd5b4d3662f94e902a0fe3e9e869e29967d.tar.gz |
rtpproto: Check for the right feature when reading a sockaddr_in6
Some systems, such as OS/2, define AF_INET6 without a full
implementation.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpproto.c')
-rw-r--r-- | libavformat/rtpproto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtpproto.c b/libavformat/rtpproto.c index 6fa3182c96..4cc69fbf0f 100644 --- a/libavformat/rtpproto.c +++ b/libavformat/rtpproto.c @@ -132,7 +132,7 @@ static int get_port(const struct sockaddr_storage *ss) { if (ss->ss_family == AF_INET) return ntohs(((const struct sockaddr_in *)ss)->sin_port); -#ifdef AF_INET6 +#if HAVE_STRUCT_SOCKADDR_IN6 if (ss->ss_family == AF_INET6) return ntohs(((const struct sockaddr_in6 *)ss)->sin6_port); #endif @@ -143,7 +143,7 @@ static void set_port(struct sockaddr_storage *ss, int port) { if (ss->ss_family == AF_INET) ((struct sockaddr_in *)ss)->sin_port = htons(port); -#ifdef AF_INET6 +#if HAVE_STRUCT_SOCKADDR_IN6 else if (ss->ss_family == AF_INET6) ((struct sockaddr_in6 *)ss)->sin6_port = htons(port); #endif |