fixed typdef issue for compiling on Solaris/SmartOS