public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Fix for rexec_af
@ 2000-01-22 16:56 Mark Kettenis
  0 siblings, 0 replies; only message in thread
From: Mark Kettenis @ 2000-01-22 16:56 UTC (permalink / raw)
  To: libc-hacker

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-01-22 16:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-22 16:56 Fix for rexec_af Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).