cvs commit: src/lib/libpam/modules/pam_radius pam_radius.c

Ruslan Ermilov ru at FreeBSD.org
Fri Jun 25 05:21:49 PDT 2004


On Fri, Jun 25, 2004 at 02:16:27PM +0200, Dag-Erling Sm?rgrav wrote:
> Ruslan Ermilov <ru at FreeBSD.org> writes:
> > On Fri, Jun 25, 2004 at 11:28:50AM +0200, Dag-Erling Sm?rgrav wrote:
> > > Alexander Kabaev <kan at FreeBSD.org> writes:
> > > >   Log:
> > > >   Remove the use of cast as lvalue.
> > > This trades one style bug for another (missing space before *), breaks
> > > the build on 64-bit platforms, and violates maintainership.
> > Ah, so this commit is responsible for a cross-build breakage...
> 
> No, this one currently only breaks Alpha because we apparently don't
> enforce alignment requirements on other platforms.
> 
It also breaks ia64 (verified on pluto1), and probably sparc64 too (my
cross-build test broke).  I restarted my sparc64 cross-build test with
the following bandaid patch for the time being:

%%%
Index: pam_radius.c
===================================================================
RCS file: /home/ncvs/src/lib/libpam/modules/pam_radius/pam_radius.c,v
retrieving revision 1.21
diff -u -p -r1.21 pam_radius.c
--- pam_radius.c	25 Jun 2004 01:54:26 -0000	1.21
+++ pam_radius.c	25 Jun 2004 12:18:16 -0000
@@ -111,7 +111,7 @@ build_access_request(struct rad_handle *
 		hints.ai_family = PF_INET;
 		if (getaddrinfo(nas_ipaddr, NULL, &hints, &res) == 0 &&
 		    res != NULL) {
-			haddr = (struct sockaddr_in*)res->ai_addr;
+			haddr = (struct sockaddr_in *)(void *)res->ai_addr;
 			error = rad_put_addr(radh, RAD_NAS_IP_ADDRESS,
 			    haddr->sin_addr);
 			freeaddrinfo(res);
%%%


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20040625/9ef41457/attachment.bin


More information about the cvs-src mailing list