1 2 3 4 5 6 7 8 9 10 11 12 13
#include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #if !defined EAI_NONAME #define EAI_NONAME -2 #endif #if !defined EAI_AGAIN #define EAI_AGAIN -3 #endif #if !defined EAI_FAIL #define EAI_FAIL -4 #endif