diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-12 01:52:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-15 13:31:00 +0200 |
commit | 8c1dc1f6ed119c2bffc937efc5f591cfaf0d35b3 (patch) | |
tree | e0c2610076eae8f5129cec553b6be8c33cea47d7 /libavformat | |
parent | 91459bd320b43ca18379801298f0c05e83f48295 (diff) | |
download | ffmpeg-8c1dc1f6ed119c2bffc937efc5f591cfaf0d35b3.tar.gz |
avformat/network: add union for avoiding strict aliassing violations with sockaddr*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/network.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/network.h b/libavformat/network.h index d89a62daa3..d4e1a894cb 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -72,6 +72,14 @@ int ff_neterrno(void); #include <poll.h> #endif +typedef union sockaddr_union { + struct sockaddr_storage storage; + struct sockaddr_in in; +#if HAVE_STRUCT_SOCKADDR_IN6 + struct sockaddr_in6 in6; +#endif +} sockaddr_union; + int ff_socket_nonblock(int socket, int enable); extern int ff_network_inited_globally; |