-
Notifications
You must be signed in to change notification settings - Fork 2k
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/net/gnrc/netif: Fix compilation on waspmote-pro #15042
sys/net/gnrc/netif: Fix compilation on waspmote-pro #15042
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sad, that this doesn't work generally :(
10ba1fe
to
afbb619
Compare
@miri64 is this one OK now? |
sys/net/gnrc/netif/gnrc_netif.c
Outdated
@@ -27,7 +27,9 @@ | |||
#include "net/gnrc/ipv6/nib.h" | |||
#include "net/gnrc/ipv6.h" | |||
#endif /* MODULE_GNRC_IPV6_NIB */ | |||
#ifdef MODULE_GNRC_NETIF_PKTQ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too
#ifdef MODULE_GNRC_NETIF_PKTQ | |
#if IS_USED(MODULE_GNRC_NETIF_PKTQ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is consistent with the other includes. Should I update the other as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe as own commit upfront, and the current commit is added afterwards? That way it would always be consistent and one commit per logical change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miri64: Did as described above.
One minor nitpick remaining |
afbb619
to
2a4eeef
Compare
@maribu murdock is not happy :( |
Looks good now, don't have the capability to test though. @jia200x can you have look?
I ran in those issues a few times when using #if IS_USED(MODULE_FOO)
#include "foo.h"
#endif Let me revert the changes to the previous state and use |
Most likely the problem comes because |
No, |
xtimer.h must not be included, when the xtimer module is not use. Otherwise compilation on the waspmote-pro with RIOT-OS#14799 will not longer work. gnrc_netif_pktq includes xtimer.h and uses xtimer, but gnrc_netif includes gnrc_netif_pktq.h regardless of whether gnrc_netif_pktq is used. This makes sure that gnrc_netif_pktq.h is only included when actually used.
2a4eeef
to
8a5d301
Compare
OK, the issue was just me being stupid :-) ( |
Generated binaries of (Compiled with |
No surprise, because AFAIK the code you touch is not covered by those tests 😅. Can you check with |
Compiled with In the HTML it seems that
So no machine code changed. I wonder why |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, if there is literally no change, I think this can be merged. example/gnrc_networking
also still works withoout gnrc_netif_pktq
.
Contribution description
xtimer.h
must not be included, when the xtimer module is not use. Otherwise compilation on the waspmote-pro with #14799 will not longer work.gnrc_netif_pktq
includesxtimer.h
and usesxtimer
, butgnrc_netif
includesgnrc_netif_pktq.h
regardless of whethergnrc_netif_pktq
is used. This makes sure thatgnrc_netif_pktq.h
is only included when actually used.Testing procedure
No changes in generated binaries
Issues/PRs references
Needed for #14799