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

s/sa_len/len/ in sock_principal.c



It seems that  at least one platform (IRIX) has  a macro called sa_len
(defined in sys/socket.h).

--- sock_principal.c	2001/07/23 21:20:25
+++ sock_principal.c	2001/07/23 22:02:14
@@ -47,15 +47,15 @@
     krb5_error_code ret;
     struct sockaddr_storage __ss;
     struct sockaddr *sa = (struct sockaddr *)&__ss;
-    socklen_t sa_len = sizeof(__ss);
+    socklen_t len = sizeof(__ss);
     char hostname[NI_MAXHOST];
 
-    if (getsockname (sock, sa, &sa_len) < 0) {
+    if (getsockname (sock, sa, &len) < 0) {
 	ret = errno;
 	krb5_set_error_string (context, "getsockname: %s", strerror(ret));
 	return ret;
     }
-    ret = getnameinfo (sa, sa_len, hostname, sizeof(hostname), NULL, 0, 0);
+    ret = getnameinfo (sa, len, hostname, sizeof(hostname), NULL, 0, 0);
     if (ret) {
 	int save_errno = errno;
 
-- 
Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org