work around negated error code bug on some mips kernels