-
Notifications
You must be signed in to change notification settings - Fork 7.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
[TW#15973] select() FD_GET/FD_SET macros are incorrectly defined #1141
Comments
LwIP sockets start at Previously, It is unlikely, but if you happen to do operations on fd sets before LwIP is initialized, you may get incorrect behavior. Otherwise, Perhaps you could share the code which you are having an issue with? |
The code is at https://github.com/karawin/Ka-Radio32 It works well on esp8266 and worked well in esp32 before the last release. How can i know if lwip_socket_offset is initialized? |
Something is wrong in FD_XXXX because
|
It seems that i am not able to include the right FD_XXXX in lwip/sockets.h typedef struct fd_set #elif LWIP_SOCKET_OFFSET |
Succeeded with these modifications in lwip/sockets.h /* FD_SET used for lwip_select */ |
Thanks for reporting this @karawin. There was a second set of FD_SET/etc macros in newlib sys/types.h that were unexpectedly overriding the LWIP ones. This is why the workaround you have is working as well. A fix to the newlib header is on the way, in the mean time the workaround you have will fix the problem. |
Great, Thanks |
On SDK v3.0-dev-942-g2e8441df-dirty
Sockets are allocated from 4096.
This break the FD_xxxx and far from FD_SETSIZE
So no select() can work.
Why this change?
The text was updated successfully, but these errors were encountered: