Skip to content

Commit

Permalink
Merge pull request #91 from bjia56/build-musl
Browse files Browse the repository at this point in the history
build: include missing headers to build with musl libc
  • Loading branch information
sepfy authored Aug 19, 2024
2 parents d436303 + 4245f4a commit a2845b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/select.h>

#include <pthread.h>
#include "socket.h"
Expand Down Expand Up @@ -266,7 +267,7 @@ void agent_gather_candidate(Agent *agent, const char *urls, const char *username
if (ports_resolve_addr(hostname, &resolved_addr) != 0) {
continue;
}

addr_set_port(&resolved_addr, port);
addr_to_string(&resolved_addr, addr_string, sizeof(addr_string));
LOGI("stun/turn server %s:%d", addr_string, port);
Expand Down
3 changes: 2 additions & 1 deletion src/mdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <netinet/in.h>
#include <inttypes.h>
#include "utils.h"
Expand Down Expand Up @@ -70,7 +71,7 @@ static int mdns_parse_answer(uint8_t *buf, int size, Address *addr) {
return -1;
}

memcpy(&addr->sin.sin_addr, answer->data, 4);
memcpy(&addr->sin.sin_addr, answer->data, 4);
return 0;
}

Expand Down

0 comments on commit a2845b3

Please sign in to comment.