Fixed GCC compilation errors