added typedef for PortalInternal when compiling in linux kernel