On Mon, Jun 2, 2014 at 3:01 PM, Felix Janda felix.janda@posteo.de wrote:
dlls/ws2_32/socket.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index e31f396..cf5473d 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -109,6 +109,8 @@ # include <linux/types.h> # endif # include <linux/ipx.h> +# define SOL_IPX 256 +# define IPX_TYPE 1 # define HAS_IPX #endif
Hi, can you share the details about how you are compiling this? There may be a better solution like not defining HAS_IPX if SOL_IPX is not present. If you help me reproduce the issue I can help to fix it.
Best regards, Bruno
Bruno Jesus wrote:
On Mon, Jun 2, 2014 at 3:01 PM, Felix Janda felix.janda@posteo.de wrote:
dlls/ws2_32/socket.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index e31f396..cf5473d 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -109,6 +109,8 @@ # include <linux/types.h> # endif # include <linux/ipx.h> +# define SOL_IPX 256 +# define IPX_TYPE 1 # define HAS_IPX #endif
Hi, can you share the details about how you are compiling this? There may be a better solution like not defining HAS_IPX if SOL_IPX is not present. If you help me reproduce the issue I can help to fix it.
Thanks for your review. All my patches stem from issues when trying to compile wine on a musl libc[1] based system.
The wiki[2] contains information on how to get a musl based distro but in order to reproduce the issue it should be enough to rename the netipx/ipx.h header file.
The situation is that there is no netipx/ipx.h in musls headers but if linux headers are installed then there will be linux/ipx.h. So except for the definitions of SOL_IPX and IPX_TYPE everything is declared in order to make dlls/ws2_32/socket.c compile with HAS_IPX.
Without the patch HAS_IPX will be declared anyway since linux/ipx.h exists. Then there are passages in socket.c behind #ifdef HAS_IPX where #ifdef SOL_IPX is used in order to determine whether to take linux or BSD specific code. musl pulls in the BSD specific code and so the compilation will fail.
Not defining HAS_IPX would also fix the compilation but I don't see why one has to disable IPX because of 2 ipx specific constants not declared in linux/ipx.h. (The 2 constants are also declared in an kernel header not exported to userspace.)
I'm not sure what's the best solution. I guess that one of the main remaining uses of IPX in linux is to play old network games in wine. Other possible solutions are for musl to include a netipx/ipx.h header (unlikely, the headers are tried to be kept as clean as possible) or declare the constants in sys/socket.h (maybe) or for the kernel to include the constants in linux/ipx.h.
Felix
On Fri, Jun 13, 2014 at 2:14 PM, Felix Janda felix.janda@posteo.de wrote:
... Not defining HAS_IPX would also fix the compilation but I don't see why one has to disable IPX because of 2 ipx specific constants not declared in linux/ipx.h. (The 2 constants are also declared in an kernel header not exported to userspace.)
I'm not sure what's the best solution. I guess that one of the main remaining uses of IPX in linux is to play old network games in wine. Other possible solutions are for musl to include a netipx/ipx.h header (unlikely, the headers are tried to be kept as clean as possible) or declare the constants in sys/socket.h (maybe) or for the kernel to include the constants in linux/ipx.h.
If the system does not #define the required variables to support IPX then I don't think it's right to manually define then and assume they will work. I'll download it and give it a try later.
Bruno
Bruno Jesus wrote:
On Fri, Jun 13, 2014 at 2:14 PM, Felix Janda felix.janda@posteo.de wrote:
... Not defining HAS_IPX would also fix the compilation but I don't see why one has to disable IPX because of 2 ipx specific constants not declared in linux/ipx.h. (The 2 constants are also declared in an kernel header not exported to userspace.)
I'm not sure what's the best solution. I guess that one of the main remaining uses of IPX in linux is to play old network games in wine. Other possible solutions are for musl to include a netipx/ipx.h header (unlikely, the headers are tried to be kept as clean as possible) or declare the constants in sys/socket.h (maybe) or for the kernel to include the constants in linux/ipx.h.
If the system does not #define the required variables to support IPX then I don't think it's right to manually define then and assume they will work. I'll download it and give it a try later.
The constants are only used for the [sg]etsockopt() system calls. They are hardcoded in the linux kernel.
As stated above I'm open to alternative solutions than the patch.
Thanks for trying to reproduce the problem.
Felix