-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
net: sockets: Use struct timeval provided by libc #41916
net: sockets: Use struct timeval provided by libc #41916
Conversation
Instead of redefining own `struct zsock_timeval` type at the socket layer, use a standard type provided by libc. This prevents the compliation errors when application includes both, `net/socket.h` and standard C header defining `struct timeval` (sys/time.h). Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Solves my issue #41503. |
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.
LGTM
@rlubos should this be backported? |
I don't think we need to backport this, the error can be easily avoided by reordering headers. |
Wouldn't backporting this make it easier? |
Well, if you insist. |
Instead of redefining own
struct zsock_timeval
type at the socketlayer, use a standard type provided by libc. This prevents the
compliation errors when application includes both,
net/socket.h
andstandard C header defining
struct timeval
(sys/time.h).Fixes #41503
Signed-off-by: Robert Lubos robert.lubos@nordicsemi.no