Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys,examples,tests,fuzzing: add missing includes #17714

Merged
merged 6 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/cord_epsim/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "net/gcoap.h"
#include "net/cord/epsim.h"
#include "net/cord/common.h"
#include "net/gnrc/netif.h"
#include "net/sock/util.h"
#include "net/ipv6/addr.h"
#include "xtimer.h"
Expand Down
1 change: 1 addition & 0 deletions examples/cord_lc/cord_lc_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "net/cord/config.h"
#include "net/cord/lc.h"
#include "net/gnrc/netif.h"
#include "net/gcoap.h"
#include "net/sock/util.h"

Expand Down
1 change: 1 addition & 0 deletions examples/dtls-echo/dtls-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <inttypes.h>

#include "timex.h"
#include "net/gnrc/netif.h"
#include "net/sock/udp.h"
#include "tinydtls_keys.h"

Expand Down
1 change: 1 addition & 0 deletions examples/dtls-sock/dtls-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "kernel_defines.h"

#include "net/gnrc/netif.h"
#include "net/sock/udp.h"
#include "net/sock/dtls.h"
#include "net/sock/dtls/creds.h"
Expand Down
1 change: 1 addition & 0 deletions examples/dtls-wolfssl/dtls-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <stdlib.h>
#include <string.h>

#include "net/gnrc/netif.h"
#include "log.h"

#define SERVER_PORT 11111
Expand Down
1 change: 1 addition & 0 deletions examples/emcute_mqttsn/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "msg.h"
#include "net/emcute.h"
#include "net/ipv6/addr.h"
#include "thread.h"

#ifndef EMCUTE_ID
#define EMCUTE_ID ("gertrud")
Expand Down
1 change: 1 addition & 0 deletions fuzzing/gnrc_tcp/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "net/af.h"
#include "net/gnrc/tcp.h"
#include "net/gnrc/netreg.h"
#include "net/ipv6/addr.h"
#include "net/gnrc/pkt.h"

Expand Down
1 change: 0 additions & 1 deletion sys/include/net/gnrc/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
#define NET_GNRC_IPV6_H

#include "sched.h"
#include "net/gnrc.h"
#include "thread.h"

#include "net/ipv6.h"
Expand Down
1 change: 1 addition & 0 deletions sys/include/net/sock/dtls.h
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@
#define NET_SOCK_DTLS_H

#include <assert.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
Expand Down
1 change: 1 addition & 0 deletions sys/include/net/sock/ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
#ifndef NET_SOCK_IP_H
#define NET_SOCK_IP_H

#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
Expand Down
1 change: 1 addition & 0 deletions sys/include/net/sock/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@
#ifndef NET_SOCK_TCP_H
#define NET_SOCK_TCP_H

#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
Expand Down
1 change: 1 addition & 0 deletions sys/include/net/sock/udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
#ifndef NET_SOCK_UDP_H
#define NET_SOCK_UDP_H

#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
Expand Down
1 change: 1 addition & 0 deletions sys/net/application_layer/dhcpv6/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "kernel_defines.h"
#include "net/dhcpv6/client.h"
#include "net/dhcpv6.h"
#include "net/netif.h"
#include "net/sock/udp.h"
#include "random.h"
#include "timex.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <assert.h>

#include "net/ipv6.h"
#include "net/gnrc/netreg.h"
#include "net/gnrc/icmpv6.h"
#include "net/gnrc/netif.h"
#include "net/gnrc/pktbuf.h"
Expand Down
1 change: 1 addition & 0 deletions sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "net/gnrc/ndp.h"
#include "net/gnrc/ipv6/nib.h"
#include "net/gnrc/netif/internal.h"
#include "net/gnrc/netreg.h"
#ifdef MODULE_GNRC_SIXLOWPAN_ND
#include "net/gnrc/sixlowpan/nd.h"
#endif /* MODULE_GNRC_SIXLOWPAN_ND */
Expand Down
1 change: 1 addition & 0 deletions sys/net/gnrc/network_layer/ipv6/nib/nib.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "net/gnrc/netif/internal.h"
#include "net/gnrc/ipv6/nib.h"
#include "net/gnrc/ndp.h"
#include "net/gnrc/netreg.h"
#include "net/gnrc/pktqueue.h"
#include "net/gnrc/sixlowpan/nd.h"
#include "net/ndp.h"
Expand Down
1 change: 1 addition & 0 deletions sys/net/gnrc/network_layer/ndp/gnrc_ndp.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <string.h>
#include <inttypes.h>

#include "net/gnrc/netreg.h"
#include "net/gnrc/icmpv6.h"
#include "net/gnrc/ipv6.h"
#include "net/gnrc/netif/internal.h"
Expand Down
2 changes: 0 additions & 2 deletions sys/net/gnrc/sock/include/sock_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

#include "mbox.h"
#include "net/af.h"
#include "net/gnrc.h"
#include "net/gnrc/tcp.h"
Copy link
Contributor

@benpicco benpicco Mar 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now this breaks the sock TCP example

net/sock/tcp.h is supposed to include sock_types.h which is then a stack specific header.
Unfortunately we don't have a sock tcp application to catch this on CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, good that you cought it and fixed it with #16723, which will also be a good check to avoid this happening again

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh I thought #16739 would be less controversial way to get a (compile) test for a generic sock TCP but turns out that was not as easy as I thought

#include "net/gnrc/netreg.h"
#ifdef SOCK_HAS_ASYNC
#include "net/sock/async/types.h"
Expand Down
1 change: 1 addition & 0 deletions sys/shell/commands/sc_cord_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <stdlib.h>

#include "net/cord/ep.h"
#include "net/gnrc/netif.h"
#include "net/nanocoap.h"
#include "net/sock/util.h"
#include "net/cord/config.h"
Expand Down
1 change: 1 addition & 0 deletions sys/shell/commands/sc_sntp.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "net/sntp.h"
#include "net/ntp_packet.h"
#include "net/af.h"
#include "net/gnrc/netif.h"
#include "net/ipv6/addr.h"
#include "timex.h"

Expand Down
2 changes: 2 additions & 0 deletions tests/gnrc_sock_neterr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include <errno.h>
#include <stdio.h>
#include <string.h>

#include "msg.h"
#include "net/sock/udp.h"

Expand Down
1 change: 1 addition & 0 deletions tests/gnrc_sock_tcp/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "shell.h"
#include "msg.h"
#include "net/sock/tcp.h"
#include "net/gnrc/tcp.h"

#define MAIN_QUEUE_SIZE (8)
#define SOCK_TCP_QUEUE_SIZE (1)
Expand Down
3 changes: 3 additions & 0 deletions tests/nanocoap_cli/nanocli_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
#include <string.h>

#include "net/coap.h"
#include "net/gnrc/netif.h"
#include "net/ipv6.h"
#include "net/nanocoap.h"
#include "net/nanocoap_sock.h"
#include "net/sock/udp.h"

#include "od.h"

static ssize_t _send(coap_pkt_t *pkt, size_t len, char *addr_str, char *port_str)
Expand Down
1 change: 1 addition & 0 deletions tests/pkg_edhoc_c/initiator.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <stdio.h>

#include "net/gnrc/netif.h"
#include "net/ipv6.h"
#include "net/nanocoap_sock.h"
#include "shell.h"
Expand Down
1 change: 1 addition & 0 deletions tests/pkg_tinydtls_sock_async/dtls-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "event/thread.h"
#include "event/timeout.h"
#include "net/gnrc/netif.h"
#include "net/sock/async/event.h"
#include "net/sock/udp.h"
#include "net/sock/dtls.h"
Expand Down
1 change: 1 addition & 0 deletions tests/sock_udp_aux/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <stdio.h>
#include <string.h>

#include "thread.h"
#include "fmt.h"
#include "net/sock/udp.h"
#include "shell.h"
Expand Down