Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jul 2014 14:32:21 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269191 - head/usr.sbin/ctld
Message-ID:  <201407281432.s6SEWLh7092757@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Jul 28 14:32:20 2014
New Revision: 269191
URL: http://svnweb.freebsd.org/changeset/base/269191

Log:
  Fix r269183 build woth GCC.
  
  MFC after:	2 weeks

Modified:
  head/usr.sbin/ctld/ctld.c

Modified: head/usr.sbin/ctld/ctld.c
==============================================================================
--- head/usr.sbin/ctld/ctld.c	Mon Jul 28 14:27:05 2014	(r269190)
+++ head/usr.sbin/ctld/ctld.c	Mon Jul 28 14:32:20 2014	(r269191)
@@ -393,18 +393,23 @@ const struct auth_portal *
 auth_portal_find(const struct auth_group *ag, const struct sockaddr_storage *ss)
 {
 	const struct auth_portal *ap;
-	uint8_t *a, *b, bmask;
+	const uint8_t *a, *b;
 	int i;
+	uint8_t bmask;
 
 	TAILQ_FOREACH(ap, &ag->ag_portals, ap_next) {
 		if (ap->ap_sa.ss_family != ss->ss_family)
 			continue;
 		if (ss->ss_family == AF_INET) {
-			a = (uint8_t *)&((struct sockaddr_in *)ss)->sin_addr;
-			b = (uint8_t *)&((struct sockaddr_in *)&ap->ap_sa)->sin_addr;
+			a = (const uint8_t *)
+			    &((const struct sockaddr_in *)ss)->sin_addr;
+			b = (const uint8_t *)
+			    &((const struct sockaddr_in *)&ap->ap_sa)->sin_addr;
 		} else {
-			a = (uint8_t *)&((struct sockaddr_in6 *)ss)->sin6_addr;
-			b = (uint8_t *)&((struct sockaddr_in6 *)&ap->ap_sa)->sin6_addr;
+			a = (const uint8_t *)
+			    &((const struct sockaddr_in6 *)ss)->sin6_addr;
+			b = (const uint8_t *)
+			    &((const struct sockaddr_in6 *)&ap->ap_sa)->sin6_addr;
 		}
 		for (i = 0; i < ap->ap_mask / 8; i++) {
 			if (a[i] != b[i])



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407281432.s6SEWLh7092757>