While the code was working before, I'd still rather use socklen_t instead of int and not cast its address to void* but rather socklen_t*.
Don't change the SVR4/SCO section, as I have no means of testing that. This patch is strictly speaking not necessary, but just a tiny bit cleaner compared to before.
diff --git a/nx-X11/lib/xtrans/Xtranssock.c b/nx-X11/lib/xtrans/Xtranssock.c
index 6103213..091fc1c 100644
--- a/nx-X11/lib/xtrans/Xtranssock.c
+++ b/nx-X11/lib/xtrans/Xtranssock.c
@@ -920,9 +920,11 @@ TRANS(SocketINETGetAddr) (XtransConnInfo ciptr)
struct sockaddr_in socknamev4;
void *socknamePtr;
#if defined(SVR4) || defined(__SCO__)
+# define SOCKLEN_T_PTR void*
size_t namelen;
#else
- int namelen;
+# define SOCKLEN_T_PTR socklen_t*
+ socklen_t namelen;
#endif
PRMSG (3,"SocketINETGetAddr(%p)\n", ciptr, 0, 0);
@@ -941,7 +943,7 @@ TRANS(SocketINETGetAddr) (XtransConnInfo ciptr)
}
if (getsockname (ciptr->fd,(struct sockaddr *) socknamePtr,
- (void *)&namelen) < 0)
+ (SOCKLEN_T_PTR)&namelen) < 0)
{
#ifdef WIN32
errno = WSAGetLastError();
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ x2go-dev mailing list [email protected] http://lists.x2go.org/listinfo/x2go-dev
