elf.h: add ELFCOMPRESS_ZSTD
[musl] / src / network / gethostbyname2.c
index dc9d662..bd0da7f 100644 (file)
@@ -21,5 +21,5 @@ struct hostent *gethostbyname2(const char *name, int af)
                err = gethostbyname2_r(name, af, h,
                        (void *)(h+1), size-sizeof *h, &res, &h_errno);
        } while (err == ERANGE);
-       return err ? 0 : h;
+       return res;
 }