http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57862
--- Comment #7 from Mikael Pettersson <mikpe at it dot uu.se> --- (In reply to Gaetano Mendola from comment #6) > struct in_addr myInAddr; > myInAddr.s_addr = theIpHeader->daddr; > > as not portable, where myInAddr.s_addr and theIpHeader->daddr are of the > same type. I'm not a c-standard lawyer but I'm hard believing that in the > standard > that assignment is marked as: "undefined behaviour" unless you use memcpy. The assignment is immaterial, it's the load (theIpHeader->daddr) that's problematic because the base pointer (theIpHeader) is not correctly aligned for its declared type (struct iphdr).
