Skip to content

Commit

Permalink
dns,http,sa: fix HAVE_INET6 off warnings (#219)
Browse files Browse the repository at this point in the history
fixes #216
  • Loading branch information
sreimers authored Feb 10, 2022
1 parent 804a6d5 commit c2a14f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dns/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,10 @@ int dnsc_alloc(struct dnsc **dcpp, const struct dnsc_conf *conf,
const struct sa *srvv, uint32_t srvc)
{
struct dnsc *dnsc;
struct sa laddr, laddr6;
struct sa laddr;
#ifdef HAVE_INET6
struct sa laddr6;
#endif
int err;

if (!dcpp)
Expand Down
3 changes: 3 additions & 0 deletions src/http/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,5 +1113,8 @@ void http_client_set_laddr6(struct http_cli *cli, const struct sa *addr)
#ifdef HAVE_INET6
if (cli && addr)
sa_cpy(&cli->laddr6, addr);
#else
(void)cli;
(void)addr;
#endif
}
2 changes: 2 additions & 0 deletions src/sa/sa.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,8 @@ void sa_set_scopeid(struct sa *sa, uint32_t scopeid)
return;

sa->u.in6.sin6_scope_id = scopeid;
#else
(void)scopeid;
#endif
}

Expand Down

0 comments on commit c2a14f6

Please sign in to comment.