Instead of checking for endianness through unions use endian.h
on Linux and machine/endian.h else where.