This mostly fixes compilation on FreeBSD. - The two #defines account for slightly different structure (where FreeBSD has an additional nesting level). - The two other changes (#ifdef IPX_FRAME_NONE and using memset instead of assignment are improve portability in general, and current GCCs will optimize the memset anyway). Gerald ChangeLog: Improve portability wrt. struct sockaddr_ipx. Index: socket.c =================================================================== RCS file: /home/wine/wine/dlls/winsock/socket.c,v retrieving revision 1.116 diff -u -3 -p -r1.116 socket.c --- socket.c 6 Dec 2002 23:19:21 -0000 1.116 +++ socket.c 22 Jan 2003 12:04:15 -0000 @@ -120,6 +120,10 @@ #include "wine/server.h" #include "wine/debug.h" +#ifdef __FreeBSD__ +# define sipx_network sipx_addr.x_net +# define sipx_node sipx_addr.x_host +#endif /* __FreeBSD__ */ WINE_DEFAULT_DEBUG_CHANNEL(winsock); @@ -878,8 +882,10 @@ static const struct sockaddr* ws_sockadd * in one go */ memcpy(&uipx->sipx_network,wsipx->sa_netnum,sizeof(uipx->sipx_network)+sizeof(uipx->sipx_node)); +#ifdef IPX_FRAME_NONE uipx->sipx_type=IPX_FRAME_NONE; - uipx->sipx_zero=0; +#endif + memset(&uipx->sipx_zero,0,sizeof uipx->sipx_zero); return (const struct sockaddr*)uipx; } #endif