implement legacy function herror
based on patch by Timo Teräs; greatly simplified to use fprintf.
diff --git a/include/netdb.h b/include/netdb.h
index 8a7013a..2dd799b 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -134,6 +134,7 @@
#endif
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+void herror(const char *);
const char *hstrerror(int);
int gethostbyname_r(const char *, struct hostent *, char *, size_t, struct hostent **, int *);
int gethostbyname2_r(const char *, int, struct hostent *, char *, size_t, struct hostent **, int *);