From: Jozsef Kadlecsik Date: Fri, 6 Mar 2009 09:58:54 +0000 (+0100) Subject: Fix alignment issue on parisc arhictecture (bugzilla id 582). X-Git-Tag: v2.5.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77930a8b4c61d261e29fae97dd5bec1352298c44;p=thirdparty%2Fipset.git Fix alignment issue on parisc arhictecture (bugzilla id 582). --- diff --git a/ipset.c b/ipset.c index ba007e52..de6a4ec3 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; }