gethostbyname_r.c 253 B

1234567891011
  1. #define _GNU_SOURCE
  2. #include <sys/socket.h>
  3. #include <netdb.h>
  4. int gethostbyname_r(const char *name,
  5. struct hostent *h, char *buf, size_t buflen,
  6. struct hostent **res, int *err)
  7. {
  8. return gethostbyname2_r(name, AF_INET, h, buf, buflen, res, err);
  9. }