--- nmm/utils/net/SockStream_Linux.cpp.orig	2007-08-13 23:43:07.000000000 +0200
+++ nmm/utils/net/SockStream_Linux.cpp	2008-04-25 16:53:19.270356178 +0200
@@ -266,6 +266,14 @@
     return size;
   }
 
+#if defined(__FreeBSD__)
+// FreeBSD since 4.5 has the same semantics.
+// As 4.5 is a very old release and not supported by FreeBSD anymore, there's
+// no special check, we just assume the way too old releases are not used
+// with NMM.
+#define TCP_CORK TCP_NOPUSH
+#endif
+
 #ifndef __CYGWIN__
   void SockStream::enablePartialFrames(const bool& value){
 #ifndef BUILD_MACOSX
@@ -282,14 +290,12 @@
 
   bool SockStream::isPartialFramesEnabled(){
     int retval = 0;
-#ifndef __CYGWIN__
-#ifndef BUILD_MACOSX
+#if !defined(BUILD_MACOSX) && !defined(__CYGWIN__)
     unsigned int size = sizeof(retval);
     if (getsockopt(getSocket(), SOL_TCP, TCP_CORK, reinterpret_cast<char*>(&retval), &size) == -1)  {
       createSetSockOptException(errno);
     }
 #endif
-#endif
     return retval;
   }
 
