From 77930a8b4c61d261e29fae97dd5bec1352298c44 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Fri, 6 Mar 2009 10:58:54 +0100 Subject: Fix alignment issue on parisc arhictecture (bugzilla id 582). --- ipset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ipset.c') diff --git a/ipset.c b/ipset.c index ba007e5..de6a4ec 100644 --- a/ipset.c +++ b/ipset.c @@ -626,7 +626,8 @@ void parse_ip(const char *str, ip_set_ip_t * ip) "host/network `%s' resolves to serveral ip-addresses. " "Please specify one.", str); - *ip = ntohl(((struct in_addr *) host->h_addr_list[0])->s_addr); + memcpy(&addr, host->h_addr_list[0], sizeof(struct in_addr)); + *ip = ntohl(addr.s_addr); return; } -- cgit v1.2.3