s_addr a macro on Solaris

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




   On Solaris s_addr is a macro:

#define   s_addr  _S_un._S_addr

   So variables cannot be called s_addr!


Changelog:

 * dlls/winsock/socket.c
   Rename s_addr to src_addr to avoid a conflict on Solaris
   Rename d_addr to dst_addr for symmetry



--
Francois Gouget         fgouget@free.fr        http://fgouget.free.fr/
 "Only wimps use tape backup: _real_ men just upload their important stuff on
       ftp, and let the rest of the world mirror it ;)" -- Linus Torvalds
Index: dlls/winsock/socket.c
===================================================================
RCS file: /home/wine/wine/dlls/winsock/socket.c,v
retrieving revision 1.79
diff -u -r1.79 socket.c
--- dlls/winsock/socket.c	2002/01/21 17:59:38	1.79
+++ dlls/winsock/socket.c	2002/01/27 05:26:54
@@ -3485,27 +3485,27 @@
        /*        QOS SQOS, GQOS; */
        GROUP g;
        SOCKET cs;
-       SOCKADDR s_addr, d_addr;
+       SOCKADDR src_addr, dst_addr;
 
        TRACE("Socket  %ui, sockaddr %p, addrlen %p, fnCondition %p, dwCallbackD ata %ld\n",
                s, addr, addrlen, lpfnCondition, dwCallbackData);
 
        
-       size = sizeof(s_addr);
-       cs = WS_accept(s, &s_addr, &size);
+       size = sizeof(src_addr);
+       cs = WS_accept(s, &src_addr, &size);
        
        if (cs == SOCKET_ERROR) return SOCKET_ERROR;
 
-       CallerId.buf = (char *)&s_addr;
-       CallerId.len = sizeof(s_addr);  
+       CallerId.buf = (char *)&src_addr;
+       CallerId.len = sizeof(src_addr);  
 
        CallerData.buf = NULL;
        CallerData.len = (ULONG)NULL;   
 
-       WS_getsockname(cs, &d_addr, &size);
+       WS_getsockname(cs, &dst_addr, &size);
 
-       CalleeId.buf = (char *)&d_addr;
-       CalleeId.len = sizeof(d_addr);  
+       CalleeId.buf = (char *)&dst_addr;
+       CalleeId.len = sizeof(dst_addr);  
 
        
        ret = (*lpfnCondition)(&CallerId, &CallerData, NULL, NULL,
@@ -3515,7 +3515,7 @@
        {
                case CF_ACCEPT:
                        if (addr && addrlen)
-                               addr = memcpy(addr, &s_addr, (*addrlen > size) ?  size : *addrlen );
+                               addr = memcpy(addr, &src_addr, (*addrlen > size) ?  size : *addrlen );
                        return cs;
                case CF_DEFER:
                        SetLastError(WSATRY_AGAIN);

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux