Skip to content
Snippets Groups Projects
Commit 755ab566 authored by Fotios Valasiadis's avatar Fotios Valasiadis
Browse files

Revert "server: Avoid using SOL_IPX to detect whether IPX is supported."

This reverts commit 41cc117b.

This commit broke musl support.

With the changes introduced, the following code evaluates
to the #else branch without checking for SO_DEFAULT_HEADERS
resulting in an error.

server/sock.c +1888
```
\#ifdef HAS_IPX
        int ipx_type = protocol - WS_NSPROTO_IPX;
\#ifdef SOL_IPX
        setsockopt( sockfd, SOL_IPX, IPX_TYPE, &ipx_type, sizeof(ipx_type) );
\#else
        struct ipx val;
        /* Should we retrieve val using a getsockopt call and then
         * set the modified one? */
        val.ipx_pt = ipx_type;
        setsockopt( sockfd, 0, SO_DEFAULT_HEADERS, &val, sizeof(val) );
\#endif
\#endif
```

I propose reverting the commit, but we could probably alter
the macro in the code section provided to match the changes

relevant github issue:
https://github.com/void-linux/void-packages/pull/45202



Signed-off-by: default avatarFotios Valasiadis <fvalasiad@gmail.com>
parent b5e19a33
No related branches found
No related tags found
No related merge requests found
Pipeline #12969 failed
......@@ -62,7 +62,6 @@
#ifdef HAVE_NETIPX_IPX_H
# include <netipx/ipx.h>
# define HAS_IPX
#elif defined(HAVE_LINUX_IPX_H)
# ifdef HAVE_ASM_TYPES_H
# include <asm/types.h>
......@@ -71,6 +70,8 @@
# include <linux/types.h>
# endif
# include <linux/ipx.h>
#endif
#if defined(SOL_IPX) || defined(SO_DEFAULT_HEADERS)
# define HAS_IPX
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment