implement legacy function herror

based on patch by Timo Teräs; greatly simplified to use fprintf.
This commit is contained in:
Rich Felker
2013-12-20 11:56:16 -05:00
parent e36d8a1d74
commit 18144af297
2 changed files with 9 additions and 0 deletions

8
src/network/herror.c Normal file
View File

@ -0,0 +1,8 @@
#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));
}