Skip to contentSkip to conversation

libsepol: Maybe fix MacOS X build.

PATCH New Stephen Smalley 1 participant 1 message Feb 3, 2015 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libsepol: Maybe fix MacOS X build.

s6_addr32 is not portable; use s6_addr instead.

Change-Id I21c237588d3e7200cefa3af96065f657dae4b1e7
---
 libsepol/cil/src/cil_binary.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
libsepol/cil/src/cil_binary.c +2 -2
index e43a7cf..f2b56e8 100644
@@ -2806,8 +2806,8 @@ int cil_nodecon_to_policydb(policydb_t *pdb, struct cil_sort *nodecons)
 			new_ocon->u.node.mask = cil_nodecon->mask->ip.v4.s_addr;
 		} else if (cil_nodecon->addr->family == AF_INET6) {
 			new_ocon = cil_add_ocontext(&pdb->ocontexts[OCON_NODE6], &tail6);
-			memcpy(new_ocon->u.node6.addr, &cil_nodecon->addr->ip.v6.s6_addr32[0], 16);
-			memcpy(new_ocon->u.node6.mask, &cil_nodecon->mask->ip.v6.s6_addr32[0], 16);
+			memcpy(new_ocon->u.node6.addr, &cil_nodecon->addr->ip.v6.s6_addr[0], 16);
+			memcpy(new_ocon->u.node6.mask, &cil_nodecon->mask->ip.v6.s6_addr[0], 16);
 		} else {
 			/* should not get here */
 			rc = SEPOL_ERR;
Signature · 1 line
1.9.3