svn commit: samba r26550 - in
branches/SAMBA_4_0/source/lib/replace: . system
metze at samba.org
metze at samba.org
Thu Dec 20 15:59:39 GMT 2007
Author: metze
Date: 2007-12-20 15:59:39 +0000 (Thu, 20 Dec 2007)
New Revision: 26550
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26550
Log:
libreplace: fallback to __ss_family of struct sockaddr_storage
metze
Modified:
branches/SAMBA_4_0/source/lib/replace/libreplace.m4
branches/SAMBA_4_0/source/lib/replace/system/network.h
Changeset:
Modified: branches/SAMBA_4_0/source/lib/replace/libreplace.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-12-20 15:54:08 UTC (rev 26549)
+++ branches/SAMBA_4_0/source/lib/replace/libreplace.m4 2007-12-20 15:59:39 UTC (rev 26550)
@@ -152,6 +152,26 @@
#include <netinet/in.h>
])
+if test x"$ac_cv_type_struct_sockaddr_storage" = x"yes"; then
+AC_CHECK_MEMBER(struct sockaddr_storage.ss_family,
+ AC_DEFINE(HAVE_SS_FAMILY, 1, [Defined if struct sockaddr_storage has ss_family field]),,
+ [
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+ ])
+
+if test x"$ac_cv_member_struct_sockaddr_storage_ss_family" != x"yes"; then
+AC_CHECK_MEMBER(struct sockaddr_storage.__ss_family,
+ AC_DEFINE(HAVE___SS_FAMILY, 1, [Defined if struct sockaddr_storage has __ss_family field]),,
+ [
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+ ])
+fi
+fi
+
AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror)
AC_CHECK_FUNCS(vsyslog setlinebuf mktime ftruncate chsize rename)
AC_CHECK_FUNCS(waitpid strlcpy strlcat initgroups memmove strdup)
Modified: branches/SAMBA_4_0/source/lib/replace/system/network.h
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/system/network.h 2007-12-20 15:54:08 UTC (rev 26549)
+++ branches/SAMBA_4_0/source/lib/replace/system/network.h 2007-12-20 15:59:39 UTC (rev 26550)
@@ -249,12 +249,21 @@
#ifdef HAVE_STRUCT_SOCKADDR_IN6
#define sockaddr_storage sockaddr_in6
#define ss_family sin6_family
+#define HAVE_SS_FAMILY 1
#else
#define sockaddr_storage sockaddr_in
#define ss_family sin_family
+#define HAVE_SS_FAMILY 1
#endif
#endif
+#ifndef HAVE_SS_FAMILY
+#ifdef HAVE___SS_FAMILY
+#define ss_family __ss_family
+#define HAVE_SS_FAMILY 1
+#endif
+#endif
+
#ifndef HAVE_STRUCT_ADDRINFO
#define HAVE_STRUCT_ADDRINFO
struct addrinfo {
More information about the samba-cvs
mailing list