[Lldb-commits] [lldb] r197155 - sin_len is not available in the structure sockaddr_in under GNU/Linux. Fix the build failure. Patch by Todd Fiala (and many other who proposed similar patches)

Sylvestre Ledru sylvestre at debian.org
Thu Dec 12 05:45:48 PST 2013


Author: sylvestre
Date: Thu Dec 12 07:45:47 2013
New Revision: 197155

URL: http://llvm.org/viewvc/llvm-project?rev=197155&view=rev
Log:
sin_len is not available in the structure sockaddr_in under GNU/Linux. Fix the build failure. Patch by Todd Fiala (and many other who proposed similar patches)

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=197155&r1=197154&r2=197155&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConnectionFileDescriptor.cpp (original)
+++ lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Thu Dec 12 07:45:47 2013
@@ -1380,7 +1380,9 @@ ConnectionFileDescriptor::SocketListen (
         {
             struct sockaddr_in accept_addr;
             ::memset (&accept_addr, 0, sizeof accept_addr);
+#ifndef __linux__
             accept_addr.sin_len = sizeof accept_addr;
+#endif
             socklen_t accept_addr_len = sizeof accept_addr;
 
             int fd = ::accept (listen_fd, (struct sockaddr *)&accept_addr, &accept_addr_len);
@@ -1399,7 +1401,10 @@ ConnectionFileDescriptor::SocketListen (
             }
             else
             {
-                if (accept_addr_len == listen_addr.sockaddr_in().sin_len &&
+                if (
+#ifndef __linux__
+                    accept_addr_len == listen_addr.sockaddr_in().sin_len &&
+#endif
                     accept_addr.sin_addr.s_addr == listen_addr.sockaddr_in().sin_addr.s_addr)
                 {
                     accept_connection = true;





More information about the lldb-commits mailing list