void-packages/srcpkgs/belle-sip/patches/musl.patch

43 lines
1.5 KiB
Diff

--- a/src/belle_sip_resolver.c 2024-06-27 15:37:37.000000000 +0200
+++ - 2024-07-01 23:26:59.821646473 +0200
@@ -680,7 +680,11 @@
struct addrinfo **ai_list,
struct sockaddr *addr,
socklen_t addrlen) {
- char host[NI_MAXHOST + 1];
+ #if defined(__GLIBC__)
+ char host[NI_MAXHOST + 1];
+ #else
+ char host[1026];
+ #endif
int gai_err;
int family = ctx->family;
@@ -754,7 +758,11 @@
if (rr.ttl < BELLE_SIP_RESOLVER_CONTEXT(ctx)->min_ttl)
BELLE_SIP_RESOLVER_CONTEXT(ctx)->min_ttl = rr.ttl;
} else if ((ctx->type == DNS_T_SRV) && (rr.class == DNS_C_IN) && (rr.type == DNS_T_SRV)) {
- char host[NI_MAXHOST + 1];
+ #if defined(__GLIBC__)
+ char host[NI_MAXHOST + 1];
+ #else
+ char host[1026];
+ #endif
struct dns_srv *srv = &any.srv;
belle_sip_dns_srv_t *b_srv = belle_sip_dns_srv_create(srv);
snprintf(host, sizeof(host), "[target:%s port:%d prio:%d weight:%d]", srv->target, srv->port,
@@ -992,7 +1000,12 @@
dns_resource_record_t *rr = dns_parse_resource_record(dnsPacket, rdlen + 11);
belle_sip_free(dnsPacket);
- char host[NI_MAXHOST + 1];
+ #if defined(__GLIBC__)
+ char host[NI_MAXHOST + 1];
+ #else
+ char host[1026];
+ #endif
+
belle_sip_dns_srv_t *b_srv = belle_sip_dns_srv_create_dns_service(rr);
dns_free_resource_record(rr);
snprintf(host, sizeof(host), "[target:%s port:%d prio:%d weight:%d]", b_srv->target, b_srv->port,