[omniORB] Latest omniORB 3.0.4 fails to compile on Solaris

Mark Zimmerman markzimm@frii.com
Wed, 15 May 2002 10:25:27 -0600


Greetings:

I just did a fresh CVS download and attempted to compile on Solaris 7
and 8. Both failed with the following error:

"tcpSocketMTfactory.cc", line 628: Error: SOL_TCP is not defined.
"tcpSocketMTfactory.cc", line 1292: Error: SOL_TCP is not defined.
2 Error(s) detected.

Here are the offending lines from tcpSocketMTfactory.cc:

***************
*** 610,615 ****
--- 622,642 ----
      OMNIORB_THROW_CONNECTION_BROKEN(::WSAGetLastError(),CORBA::COMPLETED_NO);
  # endif
    }
+   {
+     // Prevent Nagle's algorithm
+     int valtrue = 1;
+     if (setsockopt(pd_rendezvous,SOL_TCP,TCP_NODELAY,
+                  (char*)&valtrue,sizeof(int)) == RC_SOCKET_ERROR) {
+ 
+       CLOSESOCKET(pd_rendezvous);
+ #     ifndef __WIN32__
+       OMNIORB_THROW_CONNECTION_BROKEN(errno,CORBA::COMPLETED_NO);
+ #     else
+       OMNIORB_THROW_CONNECTION_BROKEN(::WSAGetLastError(),CORBA::COMPLETED_NO);
+ #     endif
+     }
+   }
+ 
    myaddr.sin_family = INETSOCKET;
    myaddr.sin_addr.s_addr = INADDR_ANY;
    myaddr.sin_port = htons(e->port());
***************
*** 1259,1264 ****
--- 1286,1302 ----
      return RC_INVALID_SOCKET;
    }
  
+   {
+     // Prevent Nagle's algorithm
+     int valtrue = 1;
+     if (setsockopt(sock,SOL_TCP,TCP_NODELAY,
+                  (char*)&valtrue,sizeof(int)) == RC_SOCKET_ERROR) {
+ 
+       CLOSESOCKET(sock);
+       return RC_INVALID_SOCKET;
+     }
+   }
+ 
  #if defined(USE_NONBLOCKING_CONNECT)
    // Use non-blocking connect.
  # if !defined(__WIN32__)

-- Mark