-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
SO_REUSEPORT is not defined for some linux targets #20688
Comments
Note libphobos change which introduced this depedency is dlang/phobos@9aa794c |
The issue also mentions the Druntime bindings, which have been added a few years ago, however this was missing from std.socket. This implementation provides SO_REUSEPORT on Windows as well, despite it being equivalent to SO_REUSEADDR, to simplify client code. Co-authored-by: Elias Batek <[email protected]>
There are existing I'm guessing that If you could point me to where those values are defined in the system's headers I can put a PR together, or if you would like to do that yourself, a PR to the |
also cc @ibuclaw for forwarding this to GDC/GCC |
This bug report was originally forwarded from GCC/GDC in the first place :) |
You'd have to look in the Linux source code. https://github.com/search?q=repo%3Atorvalds%2Flinux+SO_REUSEPORT+language%3AC+path%3A**%2Fsocket.h |
Bad wording on my part, I meant the resultant PR to fix the issue. |
tl;dr Alpha => 0x0200 (though, no D compiler support code for that target)
It's also missing at the top:
|
FWIW, this only affects master. |
It seems that all of the current SPARC ones are wrong. Druntime seems to assume that SPARC uses |
Maybe you're mixing up SPARC and PPC? |
Yes and no. I think I put it in the wrong place in the PR but #define SO_PEERCRED 0x0040
#define SO_LINGER 0x0080
#define SO_OOBINLINE 0x0100
#define SO_REUSEPORT 0x0200
#define SO_BSDCOMPAT 0x0400
#define SO_RCVLOWAT 0x0800
#define SO_SNDLOWAT 0x1000 https://github.com/dlang/dmd/blob/master/druntime/src/core/sys/posix/sys/socket.d#L463-L496 |
Right, those are indeed all wrong. I was tempted to know who wrote this, but of course it's me. :-) |
Its always the person you suspect most ;) |
Forwarded from https://gcc.gnu.org/PR118438.
The following targets seems to be missing a definition of SO_REUSEPORT from core/sys/posix/sys/socket.d :
s390*-linux-gnu loongarch64-linux-gnu hppa*-linux-gnu mips*-linux-gnu sparc*-*-linux-gnu
This definition is now needed to compile libphobos/src/std/socket.d too.
The text was updated successfully, but these errors were encountered: