diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-12-20 11:56:16 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-12-20 11:56:16 -0500 |
commit | 18144af297e7aa3a0f121262dba569446de6191a (patch) | |
tree | 765a8b0102421bb0a63b8c37de68bab89462d09b /src/network | |
parent | e36d8a1d74a00e56990728508635296440ddce1c (diff) | |
download | musl-18144af297e7aa3a0f121262dba569446de6191a.tar.gz musl-18144af297e7aa3a0f121262dba569446de6191a.tar.bz2 musl-18144af297e7aa3a0f121262dba569446de6191a.tar.xz musl-18144af297e7aa3a0f121262dba569446de6191a.zip |
implement legacy function herror
based on patch by Timo Teräs; greatly simplified to use fprintf.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/herror.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/herror.c b/src/network/herror.c new file mode 100644 index 00000000..65f25ff3 --- /dev/null +++ b/src/network/herror.c @@ -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)); +} |