gethostbyname.c 200 B

1234567891011
  1. #define _GNU_SOURCE
  2. #include <sys/socket.h>
  3. #include <netdb.h>
  4. #include <string.h>
  5. #include <netinet/in.h>
  6. struct hostent *gethostbyname(const char *name)
  7. {
  8. return gethostbyname2(name, AF_INET);
  9. }