mingw: do not set errno to 0 on success