Fix for rexec_af

Mark Kettenis kettenis@wins.uva.nl
Sat Jan 22 16:56:00 GMT 2000


The following fix is needed to make inet/rexec.c compile on the Hurd.
Since the Hurd uses a 4.4 BSD compatible struct sockaddr which has a
member sa_len, the trick with __libc_sa_len should not be necessary.
Using the macro SA_LEN should take care of this issue transparantly.

Mark


2000-01-23  Mark Kettenis  <kettenis@gnu.org>

	* inet/rexec.c (rexec_af): Use SA_LEN instead of __libc_sa_len.


Index: inet/rexec.c
===================================================================
RCS file: /cvs/glibc/libc/inet/rexec.c,v
retrieving revision 1.13
diff -u -r1.13 rexec.c
--- inet/rexec.c	2000/01/18 06:45:37	1.13
+++ inet/rexec.c	2000/01/23 00:50:26
@@ -117,7 +117,7 @@
 		listen(s2, 1);
 		sa2len = sizeof (sa2);
 		if (getsockname(s2, (struct sockaddr *)&sa2, &sa2len) < 0 ||
-		    sa2len != __libc_sa_len(sa2.__ss_family)) {
+		    sa2len != SA_LEN((struct sockaddr *)&sa2)) {
 			perror("getsockname");
 			(void) __close(s2);
 			goto bad;


More information about the Libc-hacker mailing list