-
Notifications
You must be signed in to change notification settings - Fork 8.3k
net: socket: fix sys/_timespec.h not found error
#75351
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
Conversation
|
Weird - it looks like there are some edge cases where this header is still needed here in networking. |
|
For consistency, shouldn't |
|
A comment about using zephy/posix/ path, don't remember what socket file it was but for some reason host header file was incorrectly used if not having the zephyr/posix prefix, that is why I used the prefix in various places. This happened with native_sim/posix board. The culprit is perhaps already fixed and not having the prefix is ok now. This was around time I deprecated the posix net api kconfig option. |
Yes - technically, if I also sympathize with @jukkar - it was quite confusing with all of the native hacks previously. If removing the other prefixes doesn't break anything, I think it should be ok, but it's hard to be certain. @ycsin, maybe try it out in CI in another draft PR? |
I wonder if we actually want these POSIX headers to be generally available, even when |
Did a search and got 139 hits, sounds like a treewide change to me |
I'm not asking for a treewide change, I was referring to this header only, where all POSIX headers inclusions are within |
When building `native_sim` with CPP & POSIX enabled, the POSIX's `unistd.h` header causes a compilation error as `sys/_timespec.h` doesn't exist in host gcc lib. Remove the 'zephyr/posix' prefix, and rely on `CMakeLists.txt`s to do the routing accordingly: - zephyr/lib/CMakeLists.txt:L11 - zephyr/lib/posix/options/CMakeLists.txt:L8 Signed-off-by: Yong Cong Sin <ycsin@meta.com>
jukkar
left a comment
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.
I hope this works this time, earlier I had to add the !defined checks to properly compile this code.
fixes #75319