@@ -745,7 +745,10 @@ void netcode_socket_set_qos( struct netcode_socket_t * socket, struct netcode_ad
745
745
}
746
746
socket_address .sin6_port = htons ( to -> port );
747
747
748
- if ( netcode_set_socket_codepoint ( socket -> handle , QOSTrafficTypeAudioVideo , 0 , & socket_address ) != 0 )
748
+ sockaddr_storage addr ;
749
+ memcpy ( (char * ) & addr , (char * ) & socket_address , sizeof (socket_address ) );
750
+
751
+ if ( netcode_set_socket_codepoint ( socket -> handle , QOSTrafficTypeAudioVideo , 0 , & addr ) != 0 )
749
752
{
750
753
netcode_printf ( NETCODE_LOG_LEVEL_ERROR , "error: failed to enable packet tagging (ipv6)\n" );
751
754
netcode_socket_destroy ( s );
@@ -763,7 +766,10 @@ void netcode_socket_set_qos( struct netcode_socket_t * socket, struct netcode_ad
763
766
( ( (uint32_t ) to -> data .ipv4 [3 ] ) << 24 );
764
767
socket_address .sin_port = htons ( to -> port );
765
768
766
- if ( netcode_set_socket_codepoint ( socket -> handle , QOSTrafficTypeAudioVideo , 0 , & socket_address ) != 0 )
769
+ sockaddr_storage addr ;
770
+ memcpy ( (char * ) & addr , (char * ) & socket_address , sizeof (socket_address ) );
771
+
772
+ if ( netcode_set_socket_codepoint ( socket -> handle , QOSTrafficTypeAudioVideo , 0 , & addr ) != 0 )
767
773
{
768
774
netcode_printf ( NETCODE_LOG_LEVEL_ERROR , "error: failed to enable packet tagging (ipv4)\n" );
769
775
netcode_socket_destroy ( s );
0 commit comments