AC_CHECK_FUNCS(inet_pton, , [AC_LIBOBJ(lib/inet_pton)])
AC_HAVE_TYPE([struct addrinfo], [#include <netdb.h>])
+AC_HAVE_TYPE([struct sockaddr_storage], [#include <sys/types.h>
+#include <sys/socket.h>])
# Irix 6.5 has getaddrinfo but not the corresponding defines, so use
# builtin getaddrinfo if one of the defines don't exist
#endif
#ifndef HAVE_STRUCT_ADDRINFO
-
struct addrinfo
{
int ai_flags;
char *ai_canonname;
struct addrinfo *ai_next;
};
-#endif /* HAVE_STRUCT_ADDRINFO */
+#endif /* !HAVE_STRUCT_ADDRINFO */
+#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
+struct sockaddr_storage {
+ unsigned short ss_family;
+ unsigned long ss_align;
+ char ss_padding[128 - sizeof (unsigned long)];
+};
+#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
#ifndef HAVE_GETADDRINFO
extern int getnameinfo(const struct sockaddr * sa, socklen_t salen,
char *node, size_t nodelen,
char *service, size_t servicelen, int flags);
-#endif /* HAVE_GETADDRINFO */
+#endif /* !HAVE_GETADDRINFO */
#endif /* ADDRINFO_H */