[Lldb-commits] [lldb] r122266 - /lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
Johnny Chen
johnny.chen at apple.com
Mon Dec 20 13:07:54 PST 2010
Author: johnny
Date: Mon Dec 20 15:07:54 2010
New Revision: 122266
URL: http://llvm.org/viewvc/llvm-project?rev=122266&view=rev
Log:
Patch from Stephen Wilson:
POSIX does not define sockaddr_un.sun_len. Set only when required by
the platform.
Modified:
lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
Modified: lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConnectionFileDescriptor.cpp?rev=122266&r1=122265&r2=122266&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConnectionFileDescriptor.cpp (original)
+++ lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Mon Dec 20 15:07:54 2010
@@ -432,7 +432,9 @@
saddr_un.sun_family = AF_UNIX;
::strncpy(saddr_un.sun_path, socket_name, sizeof(saddr_un.sun_path) - 1);
saddr_un.sun_path[sizeof(saddr_un.sun_path) - 1] = '\0';
+#if defined(__APPLE__) || defined(__FreeBSD__)
saddr_un.sun_len = SUN_LEN (&saddr_un);
+#endif
if (::bind (listen_socket, (struct sockaddr *)&saddr_un, SUN_LEN (&saddr_un)) == 0)
{
More information about the lldb-commits
mailing list