herror.c 165 B

12345678
  1. #define _GNU_SOURCE
  2. #include <stdio.h>
  3. #include <netdb.h>
  4. void herror(const char *msg)
  5. {
  6. fprintf(stderr, "%s%s%s", msg?msg:"", msg?": ":"", hstrerror(h_errno));
  7. }