Ooops ?!?!?!?
AFAIK, the memcpy() function/macro (builtin_memcpy)) is supposed to handle alignment issues automatically.
If from->sin_addr is a long (or pointer) type, it can assume it is aligned correctly, Thus the compiled code might be correct.
Maybe some erroneous memcpy() macro is active when the code sequence is compiled,.
If it is not, I would give memcpy the correct alignment. e.g.: memcpy ((char*)&from -> sin_addr, (char*)&ip -> ip_src, 4);
If the compiled code in fact is erroneous, we would need to have the library macro or compiler fixed....
-Michael