svn commit: samba r25507 - in branches: SAMBA_3_2/source SAMBA_3_2/source/lib/replace/system SAMBA_3_2_0/source SAMBA_3_2_0/source/lib/replace/system

jra at samba.org jra at samba.org
Thu Oct 4 17:35:13 GMT 2007


Author: jra
Date: 2007-10-04 17:35:12 +0000 (Thu, 04 Oct 2007)
New Revision: 25507

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25507

Log:
Fix definition of struct sockaddr_storage if
struct sockaddr_in6 is defined.
Jeremy.

Modified:
   branches/SAMBA_3_2/source/configure.in
   branches/SAMBA_3_2/source/lib/replace/system/network.h
   branches/SAMBA_3_2_0/source/configure.in
   branches/SAMBA_3_2_0/source/lib/replace/system/network.h


Changeset:
Modified: branches/SAMBA_3_2/source/configure.in
===================================================================
--- branches/SAMBA_3_2/source/configure.in	2007-10-04 17:25:41 UTC (rev 25506)
+++ branches/SAMBA_3_2/source/configure.in	2007-10-04 17:35:12 UTC (rev 25507)
@@ -3195,7 +3195,7 @@
 fi
 
 dnl test for struct sockaddr_storage
-AC_CACHE_CHECK([for ipv6 support],samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE,[
+AC_CACHE_CHECK([for struct sockaddr_storage],samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE,[
 AC_TRY_COMPILE([
 #include <sys/socket.h>
 #include <sys/types.h>],
@@ -3207,6 +3207,19 @@
     AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,1,[Whether the system has struct sockaddr_storage])
 fi
 
+dnl test for struct struct sockaddr_in6
+AC_CACHE_CHECK([for struct sockaddr_in6],samba_cv_HAVE_STRUCT_SOCKADDR_IN6,[
+AC_TRY_COMPILE([
+#include <sys/socket.h>
+#include <sys/types.h>],
+[
+struct sockaddr_in6 sa6;
+],
+samba_cv_HAVE_STRUCT_SOCKADDR_IN6=yes,samba_cv_HAVE_STRUCT_SOCKADDR_IN6=no)])
+if test x"$samba_cv_HAVE_STRUCT_SOCKADDR_IN6" = x"yes"; then
+    AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6,1,[Whether the system has struct sockaddr_in6])
+fi
+
 dnl test for struct addrinfo
 AC_CACHE_CHECK([for struct addrinfo],samba_cv_HAVE_STRUCT_ADDRINFO,[
 AC_TRY_COMPILE([

Modified: branches/SAMBA_3_2/source/lib/replace/system/network.h
===================================================================
--- branches/SAMBA_3_2/source/lib/replace/system/network.h	2007-10-04 17:25:41 UTC (rev 25506)
+++ branches/SAMBA_3_2/source/lib/replace/system/network.h	2007-10-04 17:35:12 UTC (rev 25507)
@@ -127,9 +127,14 @@
 #endif
 
 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
+#ifdef HAVE_STRUCT_SOCKADDR_IN6
+#define sockaddr_storage sockaddr_in6
+#define ss_family sin6_family
+#else
 #define sockaddr_storage sockaddr_in
 #define ss_family sin_family
 #endif
+#endif
 
 #ifndef HOST_NAME_MAX
 #define HOST_NAME_MAX 256

Modified: branches/SAMBA_3_2_0/source/configure.in
===================================================================
--- branches/SAMBA_3_2_0/source/configure.in	2007-10-04 17:25:41 UTC (rev 25506)
+++ branches/SAMBA_3_2_0/source/configure.in	2007-10-04 17:35:12 UTC (rev 25507)
@@ -3066,7 +3066,7 @@
 fi
 
 dnl test for struct sockaddr_storage
-AC_CACHE_CHECK([for ipv6 support],samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE,[
+AC_CACHE_CHECK([for struct sockaddr_storage],samba_cv_HAVE_STRUCT_SOCKADDR_STORAGE,[
 AC_TRY_COMPILE([
 #include <sys/socket.h>
 #include <sys/types.h>],
@@ -3078,6 +3078,19 @@
     AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,1,[Whether the system has struct sockaddr_storage])
 fi
 
+dnl test for struct struct sockaddr_in6
+AC_CACHE_CHECK([for struct sockaddr_in6],samba_cv_HAVE_STRUCT_SOCKADDR_IN6,[
+AC_TRY_COMPILE([
+#include <sys/socket.h>
+#include <sys/types.h>],
+[
+struct sockaddr_in6 sa6;
+],
+samba_cv_HAVE_STRUCT_SOCKADDR_IN6=yes,samba_cv_HAVE_STRUCT_SOCKADDR_IN6=no)])
+if test x"$samba_cv_HAVE_STRUCT_SOCKADDR_IN6" = x"yes"; then
+    AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6,1,[Whether the system has struct sockaddr_in6])
+fi
+
 dnl test for struct addrinfo
 AC_CACHE_CHECK([for struct addrinfo],samba_cv_HAVE_STRUCT_ADDRINFO,[
 AC_TRY_COMPILE([

Modified: branches/SAMBA_3_2_0/source/lib/replace/system/network.h
===================================================================
--- branches/SAMBA_3_2_0/source/lib/replace/system/network.h	2007-10-04 17:25:41 UTC (rev 25506)
+++ branches/SAMBA_3_2_0/source/lib/replace/system/network.h	2007-10-04 17:35:12 UTC (rev 25507)
@@ -127,9 +127,14 @@
 #endif
 
 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
+#ifdef HAVE_STRUCT_SOCKADDR_IN6
+#define sockaddr_storage sockaddr_in6
+#define ss_family sin6_family
+#else
 #define sockaddr_storage sockaddr_in
 #define ss_family sin_family
 #endif
+#endif
 
 #ifndef HOST_NAME_MAX
 #define HOST_NAME_MAX 256



More information about the samba-cvs mailing list