getsockname() takes a pointer to socklen_t which is not necessarily int.
Unified · Split
| @@ -257,7 +257,7 @@ static int udp_set_url(struct sockaddr_storage *addr, · 256 unmodified lines | |||
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | static int udp_socket_create(UDPContext *s, struct sockaddr_storage *addr, | 259 | static int udp_socket_create(UDPContext *s, struct sockaddr_storage *addr, |
| 260 | int *addr_len, const char *localaddr) | 260 | socklen_t *addr_len, const char *localaddr) |
| 261 | { | 261 | { |
| 262 | int udp_fd = -1; | 262 | int udp_fd = -1; |
| 263 | struct addrinfo *res0 = NULL, *res = NULL; | 263 | struct addrinfo *res0 = NULL, *res = NULL; |
| @@ -389,7 +389,7 @@ static int udp_open(URLContext *h, const char *uri, int flags) · 125 unmodified lines | |||
| 389 | const char *p; | 389 | const char *p; |
| 390 | char buf[256]; | 390 | char buf[256]; |
| 391 | struct sockaddr_storage my_addr; | 391 | struct sockaddr_storage my_addr; |
| 392 | int len; | 392 | socklen_t len; |
| 393 | int reuse_specified = 0; | 393 | int reuse_specified = 0; |
| 394 | int i, include = 0, num_sources = 0; | 394 | int i, include = 0, num_sources = 0; |
| 395 | char *sources[32]; | 395 | char *sources[32]; |