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