-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add Poll and Fcntl #22
base: master
Are you sure you want to change the base?
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.
Sorry for the late review!
@@ -25,6 +26,8 @@ using InAddr = ::in_addr; | |||
Result Initialize(void* pool, ulong poolSize, ulong allocPoolSize, int concurLimit); | |||
Result Finalize(); | |||
s32 SetSockOpt(s32 socket, s32 socketLevel, s32 option, const void*, u32 len); | |||
s32 Poll(pollfd *fds, unsigned long nfds, s32 timeout); |
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.
Can the unsigned long just be nfds_t as to match how poll is done in UNIX
https://man7.org/linux/man-pages/man2/poll.2.html
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.
@ThePixelGamer no, the mangled name won't link if you use nfds_t, i tried
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.
mangled name? the type should exist seeing how you're including poll.h, am I missing something?
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.
Also, nfds_t is a typedef so it won't even show up in the mangled symbol.
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.
@leoetlino it's typedefed as an unsigned int and not an unsigned long, so the mangled name changes
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.
musl (which is the libc NintendoSDK uses) typedefs it to an unsigned long.
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.
@leoetlino i tried, and it seemed to mangle it as j
and not m
. not sure 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.
::= j # unsigned int
::= l # long
::= m # unsigned long
Sounds like your header include path is set up incorrectly and you might be using your host system's poll.h (which typedefs it to unsigned int?) rather than the one from musl.
This change is