[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tinc/lib fake-getaddrinfo.c,1.1.2.2,1.1.2.3 ipv6.h,1.1.2.2,1.1.2.3
Update of /home/CVS/tinc/lib
In directory humbolt:/tmp/cvs-serv4234/lib
Modified Files:
Tag: CABAL
fake-getaddrinfo.c ipv6.h
Log Message:
More missing IPv6 definitions and autoconf checks to make sure it compiles
under Solaris 2.6.
Index: fake-getaddrinfo.c
===================================================================
RCS file: /home/CVS/tinc/lib/Attic/fake-getaddrinfo.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- fake-getaddrinfo.c 2002/09/10 22:13:22 1.1.2.2
+++ fake-getaddrinfo.c 2003/07/11 16:12:59 1.1.2.3
@@ -13,8 +13,9 @@
#include <stdlib.h>
#include <sys/types.h>
-#include <netinet/in.h>
#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
#include <netdb.h>
#include <string.h>
@@ -97,12 +98,14 @@
return EAI_MEMORY;
}
+#ifdef HAVE_INET_ATON
if (inet_aton(hostname, &in)) {
if (NULL != (*res = malloc_ai(port, in.s_addr)))
return 0;
else
return EAI_MEMORY;
}
+#endif
hp = gethostbyname(hostname);
if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
Index: ipv6.h
===================================================================
RCS file: /home/CVS/tinc/lib/Attic/ipv6.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- ipv6.h 2003/07/07 11:50:52 1.1.2.2
+++ ipv6.h 2003/07/11 16:12:59 1.1.2.3
@@ -60,6 +60,13 @@
};
#endif
+#ifndef IN6_IS_ADDR_V4MAPPED
+#define IN6_IS_ADDR_V4MAPPED(a) \
+ ((((__const uint32_t *) (a))[0] == 0) \
+ && (((__const uint32_t *) (a))[1] == 0) \
+ && (((__const uint32_t *) (a))[2] == htonl (0xffff)))
+#endif
+
#ifndef HAVE_NETINET_IP6_H
struct ip6_hdr {
union {
--
Tinc-cvs: CVS changelog list for the tinc VPN daemon
Archive: http://mail.nl.linux.org/tinc-cvs/
Tinc site: http://tinc.nl.linux.org/