#include <netinet/in.h>] ,
struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
if test "$have_sin6_scope_id" = yes; then
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
else
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([no])
fi
fi
@echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
@echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
@echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
- @echo $(DL)#define HAVE_SIN6_SCOPE_ID 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
endif
endif
@echo $(DL)#define USE_MANUAL 1$(DL) >> $@
#define ENABLE_IPV6
/* Define if struct sockaddr_in6 has the sin6_scope_id member */
-#define HAVE_SIN6_SCOPE_ID 1
+#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* Define this to 'int' if ssize_t is not an available typedefed type */
#undef ssize_t
#undef ENABLE_IPV6
/* Define if struct sockaddr_in6 has the sin6_scope_id member */
-#define HAVE_SIN6_SCOPE_ID 1
+#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* Define this to 'int' if ssize_t is not an available typedefed type */
#undef ssize_t
#define ENABLE_IPV6 1
/* Define if struct sockaddr_in6 has the sin6_scope_id member */
-#define HAVE_SIN6_SCOPE_ID 1
+#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* Define to the type qualifier of arg 1 for getnameinfo. */
#define GETNAMEINFO_QUAL_ARG1 const
/* #undef ENABLE_IPV6 */
/* Define if struct sockaddr_in6 has the sin6_scope_id member */
-/* #undef HAVE_SIN6_SCOPE_ID */
+/* #undef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID */
/* Define to the type of arg 1 for getnameinfo. */
/* #undef GETNAMEINFO_TYPE_ARG1 */
#define HAVE_STRUCT_TIMEVAL 1
/* Define this if struct sockaddr_in6 has the sin6_scope_id member */
-#define HAVE_SIN6_SCOPE_ID 1
+#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* ---------------------------------------------------------------- */
/* COMPILER SPECIFIC */
/* no socket, no connection */
return CURL_SOCKET_BAD;
-#ifdef ENABLE_IPV6
+#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
if (conn->scope && (addr.family == AF_INET6))
sa6->sin6_scope_id = conn->scope;
#endif
char scope[12]="";
#ifdef ENABLE_IPV6
if (af == AF_INET6) {
- unsigned int scopeid;
+ unsigned int scopeid = 0;
addr = &((struct sockaddr_in6 *)iface->ifa_addr)->sin6_addr;
+#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
/* Include the scope of this interface as part of the address */
scopeid = ((struct sockaddr_in6 *)iface->ifa_addr)->sin6_scope_id;
+#endif
if (scopeid)
snprintf(scope, sizeof(scope), "%%%u", scopeid);
}
@echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
@echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
@echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
- @echo $(DL)#define HAVE_SIN6_SCOPE_ID 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
endif
endif
@echo $(DL)#define USE_MANUAL 1$(DL) >> $@
#undef ENABLE_IPV6
/* Define if struct sockaddr_in6 has the sin6_scope_id member */
-#define HAVE_SIN6_SCOPE_ID 1
+#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* Define this to 'int' if ssize_t is not an available typedefed type */
#undef ssize_t
#define HAVE_STRUCT_TIMEVAL 1
/* Define this if struct sockaddr_in6 has the sin6_scope_id member */
-#define HAVE_SIN6_SCOPE_ID 1
+#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* ---------------------------------------------------------------- */
/* Watt-32 tcp/ip SPECIFIC */