[asterisk-commits] simon.perreault: branch group/v6-new r268049 - in /team/group/v6-new: include...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 4 13:57:45 CDT 2010


Author: simon.perreault
Date: Fri Jun  4 13:57:42 2010
New Revision: 268049

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=268049
Log:
More fixes for compilation on Mac OS X.

Modified:
    team/group/v6-new/include/asterisk/netsock2.h
    team/group/v6-new/main/netsock2.c

Modified: team/group/v6-new/include/asterisk/netsock2.h
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/include/asterisk/netsock2.h?view=diff&rev=268049&r1=268048&r2=268049
==============================================================================
--- team/group/v6-new/include/asterisk/netsock2.h (original)
+++ team/group/v6-new/include/asterisk/netsock2.h Fri Jun  4 13:57:42 2010
@@ -28,6 +28,8 @@
 #endif
 
 #include <sys/socket.h>
+
+#include <netinet/in.h>
 
 /**
  * Values for address families that we support. This is reproduced from socket.h

Modified: team/group/v6-new/main/netsock2.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/main/netsock2.c?view=diff&rev=268049&r1=268048&r2=268049
==============================================================================
--- team/group/v6-new/main/netsock2.c (original)
+++ team/group/v6-new/main/netsock2.c Fri Jun  4 13:57:42 2010
@@ -48,7 +48,7 @@
 	memset(&sin4, 0, sizeof(sin4));
 	sin4.sin_family = AF_INET;
 	sin4.sin_port = sin6->sin6_port;
-	sin4.sin_addr.s_addr = sin6->sin6_addr.s6_addr32[3];
+	sin4.sin_addr.s_addr = ((uint32_t *)&sin6->sin6_addr)[3];
 
 	*ast_mapped = ast_sockaddr_from_sin(sin4);
 
@@ -377,7 +377,7 @@
 	case AF_INET:
 		return ((const struct sockaddr_in *)&addr->ss)->sin_addr.s_addr;
 	case AF_INET6:
-		return ((const struct sockaddr_in6 *)&addr->ss)->sin6_addr.s6_addr32[3];
+		return ((uint32_t *)&((const struct sockaddr_in6 *)&addr->ss)->sin6_addr)[3];
 	default:
 		ast_log(LOG_ERROR, "Unknown address family '%d'.\n",
 			addr->ss.ss_family);
@@ -431,10 +431,12 @@
 	else if (tos)
 		ast_verb(2, "Using %s TOS bits %d\n", desc, tos);
 
+#ifdef linux
 	if (setsockopt(sockfd, SOL_SOCKET, SO_PRIORITY, &cos, sizeof(cos)))
 		ast_log(LOG_WARNING, "Unable to set %s CoS to %d\n", desc, cos);
 	else if (cos)
 		ast_verb(2, "Using %s CoS mark %d\n", desc, cos);
+#endif
 
 	return res;
 }




More information about the asterisk-commits mailing list