[Lldb-commits] [lldb] r196790 - FreeBSD and NetBSD have sa_len in struct sockaddr
Ed Maste
emaste at freebsd.org
Mon Dec 9 08:07:12 PST 2013
Author: emaste
Date: Mon Dec 9 10:07:11 2013
New Revision: 196790
URL: http://llvm.org/viewvc/llvm-project?rev=196790&view=rev
Log:
FreeBSD and NetBSD have sa_len in struct sockaddr
Modified:
lldb/trunk/source/Host/common/SocketAddress.cpp
Modified: lldb/trunk/source/Host/common/SocketAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/SocketAddress.cpp?rev=196790&r1=196789&r2=196790&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/SocketAddress.cpp (original)
+++ lldb/trunk/source/Host/common/SocketAddress.cpp Mon Dec 9 10:07:11 2013
@@ -95,7 +95,7 @@ GetFamilyLength (sa_family_t family)
socklen_t
SocketAddress::GetLength () const
{
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
return m_socket_addr.sa.sa_len;
#else
return GetFamilyLength (GetFamily());
@@ -118,7 +118,7 @@ void
SocketAddress::SetFamily (sa_family_t family)
{
m_socket_addr.sa.sa_family = family;
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
m_socket_addr.sa.sa_len = GetFamilyLength (family);
#endif
}
More information about the lldb-commits
mailing list