Move typedefs into port.h