Fixed offsetof not defined by default in gcc. Added misc.h