Fix return code redeclaration for platforms with SO_NOSIGPIPE