summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ConnectionFileDescriptor.cpp
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-12-20 21:07:54 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-12-20 21:07:54 +0000
commita6846833ea254385d6432f78786db92480097925 (patch)
treee2a0f44b80088a03ca24d942f4023793860564ee /lldb/source/Core/ConnectionFileDescriptor.cpp
parenteaff500c7b3591701441f857db3ab032ac59dfa4 (diff)
downloadbcm5719-llvm-a6846833ea254385d6432f78786db92480097925.tar.gz
bcm5719-llvm-a6846833ea254385d6432f78786db92480097925.zip
Patch from Stephen Wilson:
POSIX does not define sockaddr_un.sun_len. Set only when required by the platform. llvm-svn: 122266
Diffstat (limited to 'lldb/source/Core/ConnectionFileDescriptor.cpp')
-rw-r--r--lldb/source/Core/ConnectionFileDescriptor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Core/ConnectionFileDescriptor.cpp b/lldb/source/Core/ConnectionFileDescriptor.cpp
index da199b99b5e..30cab9f4c32 100644
--- a/lldb/source/Core/ConnectionFileDescriptor.cpp
+++ b/lldb/source/Core/ConnectionFileDescriptor.cpp
@@ -432,7 +432,9 @@ ConnectionFileDescriptor::NamedSocketAccept (const char *socket_name, Error *err
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)
{
OpenPOWER on IntegriCloud