Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-12 03:52:38 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-09-15 15:31:00 +0400
commit8c1dc1f6ed119c2bffc937efc5f591cfaf0d35b3 (patch)
treee0c2610076eae8f5129cec553b6be8c33cea47d7 /libavformat/network.h
parent91459bd320b43ca18379801298f0c05e83f48295 (diff)
avformat/network: add union for avoiding strict aliassing violations with sockaddr*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/network.h')
-rw-r--r--libavformat/network.h8
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;