avformat/network: add union for avoiding strict aliassing violations with sockaddr*

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-09-12 01:52:38 +02:00
parent 91459bd320
commit 8c1dc1f6ed
1 changed files with 8 additions and 0 deletions

View File

@ -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;