Skip to content

Commit f27764f

Browse files
finikorgjukkar
authored andcommitted
net: llmnr_responder: Fix implicit declaration error
create_ipv6_answer() function is behind #define's but get used behind IS_ENABLED(CONFIG_NET_IPV6), which is not allowed. Signed-off-by: Andrei Emeltchenko <[email protected]>
1 parent 3c08b27 commit f27764f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/net/lib/dns/llmnr_responder.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ static int create_ipv4_answer(struct net_context *ctx,
324324
}
325325
#endif /* CONFIG_NET_IPV4 */
326326

327-
#if defined(CONFIG_NET_IPV6)
328327
static int create_ipv6_answer(struct net_context *ctx,
329328
struct net_pkt *pkt,
330329
union net_ip_header *ip_hdr,
@@ -334,6 +333,7 @@ static int create_ipv6_answer(struct net_context *ctx,
334333
struct sockaddr *dst,
335334
socklen_t *dst_len)
336335
{
336+
#if defined(CONFIG_NET_IPV6)
337337
const u8_t *addr;
338338
int addr_len;
339339

@@ -370,9 +370,9 @@ static int create_ipv6_answer(struct net_context *ctx,
370370

371371
net_context_set_ipv6_hop_limit(ctx, 255);
372372

373+
#endif /* CONFIG_NET_IPV6 */
373374
return 0;
374375
}
375-
#endif /* CONFIG_NET_IPV6 */
376376

377377
static int send_response(struct net_context *ctx, struct net_pkt *pkt,
378378
union net_ip_header *ip_hdr, struct net_buf *reply,

0 commit comments

Comments
 (0)