Skip to content

Commit

Permalink
Merge pull request #13443 from benpicco/dns-fixes
Browse files Browse the repository at this point in the history
shell/gnrc_icmpv6_echo: fix build with USEMODULE += sock_dns
  • Loading branch information
benpicco committed Feb 22, 2020
2 parents ce947b4 + 5256f06 commit f0c68a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sys/shell/commands/sc_gnrc_icmpv6_echo.c
Expand Up @@ -36,6 +36,9 @@
#ifdef MODULE_GNRC_IPV6_NIB
#include "net/gnrc/ipv6/nib/nc.h"
#endif
#ifdef MODULE_SOCK_DNS
#include "net/sock/dns.h"
#endif
#include "net/icmpv6.h"
#include "net/ipv6.h"
#include "timex.h"
Expand Down
7 changes: 7 additions & 0 deletions tests/gnrc_sock_dns/main.c
Expand Up @@ -26,6 +26,9 @@
#include "net/sock/dns.h"
#include "shell.h"

#define MAIN_QUEUE_SIZE (8)
static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];

static int _dns(int argc, char **argv);

static const shell_command_t _shell_commands[] = {
Expand Down Expand Up @@ -102,6 +105,10 @@ static int _dns(int argc, char **argv)

int main(void)
{
/* we need a message queue for the thread running the shell in order to
* receive potentially fast incoming networking packets */
msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE);

/* start shell */
shell_run(_shell_commands, _shell_buffer, sizeof(_shell_buffer));
return 0;
Expand Down

0 comments on commit f0c68a7

Please sign in to comment.