musl/src/network/herror.c
Rich Felker 18144af297 implement legacy function herror
based on patch by Timo Teräs; greatly simplified to use fprintf.
2013-12-20 11:56:16 -05:00

8 lines
165 B
C

#define _GNU_SOURCE
#include <stdio.h>
#include <netdb.h>
void herror(const char *msg)
{
fprintf(stderr, "%s%s%s", msg?msg:"", msg?": ":"", hstrerror(h_errno));
}