diff -urp ../live_orig/BasicUsageEnvironment/include/DelayQueue.hh ./BasicUsageEnvironment/include/DelayQueue.hh
--- ../live_orig/BasicUsageEnvironment/include/DelayQueue.hh	2009-03-23 01:26:16.000000000 +0300
+++ ./BasicUsageEnvironment/include/DelayQueue.hh	2009-04-24 19:24:03.000000000 +0400
@@ -111,9 +111,9 @@ DelayInterval operator*(short arg1, Dela
 
 extern DelayInterval const DELAY_ZERO;
 extern DelayInterval const DELAY_SECOND;
-DelayInterval const DELAY_MINUTE = 60*DELAY_SECOND;
-DelayInterval const DELAY_HOUR = 60*DELAY_MINUTE;
-DelayInterval const DELAY_DAY = 24*DELAY_HOUR;
+//DelayInterval const DELAY_MINUTE = 60*DELAY_SECOND; JJ - commenting these out because they're unused and break weak linking
+//DelayInterval const DELAY_HOUR = 60*DELAY_MINUTE;
+//DelayInterval const DELAY_DAY = 24*DELAY_HOUR;
 
 ///// EventTime /////
 
diff -urp ../live_orig/UsageEnvironment/include/Boolean.hh ./UsageEnvironment/include/Boolean.hh
--- ../live_orig/UsageEnvironment/include/Boolean.hh	2009-03-23 01:26:16.000000000 +0300
+++ ./UsageEnvironment/include/Boolean.hh	2009-04-24 19:24:03.000000000 +0400
@@ -21,7 +21,13 @@ along with this library; if not, write t
 #define False false
 #define True true
 #else
+#if TARGET_OS_MAC
+#ifndef _OS_OSTYPES_H	// OSTypes.h in MacOS X defines Boolean as unsigned char
+typedef unsigned char Boolean;
+#endif
+#else
 typedef unsigned Boolean;
+#endif
 #ifndef False
 const Boolean False = 0;
 #endif
diff -urp ../live_orig/config.macosx ./config.macosx
--- ../live_orig/config.macosx	2009-03-23 01:26:16.000000000 +0300
+++ ./config.macosx	2009-04-24 19:24:03.000000000 +0400
@@ -1,10 +1,10 @@
-COMPILE_OPTS =		$(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1
+COMPILE_OPTS =		$(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -DTARGET_OS_MAC -fPIC
 C =			c
 C_COMPILER =		cc
-C_FLAGS =		$(COMPILE_OPTS)
+C_FLAGS =		$(COMPILE_OPTS) -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
 CPP =			cpp
 CPLUSPLUS_COMPILER =	c++
-CPLUSPLUS_FLAGS =	$(COMPILE_OPTS) -Wall
+CPLUSPLUS_FLAGS =	$(COMPILE_OPTS) -Wall -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
 OBJ =			o
 LINK =			c++ -o 
 LINK_OPTS =		-L.
diff -urp ../live_orig/groupsock/GroupsockHelper.cpp ./groupsock/GroupsockHelper.cpp
--- ../live_orig/groupsock/GroupsockHelper.cpp	2009-03-23 01:26:16.000000000 +0300
+++ ./groupsock/GroupsockHelper.cpp	2009-04-24 19:24:03.000000000 +0400
@@ -167,6 +167,14 @@ int setupStreamSocket(UsageEnvironment& 
     return -1;
   }
 
+	// Disable SIGPIPE for socket
+#if !(defined(__WIN32__) || defined(_WIN32))
+	{
+		int	sock_opt	= 1;
+		setsockopt(newSocket, SOL_SOCKET, SO_NOSIGPIPE, &sock_opt, sizeof(sock_opt));
+	}
+#endif
+
   // SO_REUSEPORT doesn't really make sense for TCP sockets, so we
   // normally don't set them.  However, if you really want to do this
   // #define REUSE_FOR_TCP
diff -urp ../live_orig/liveMedia/RTSPClient.cpp ./liveMedia/RTSPClient.cpp
--- ../live_orig/liveMedia/RTSPClient.cpp	2009-03-23 01:26:16.000000000 +0300
+++ ./liveMedia/RTSPClient.cpp	2009-04-24 19:24:25.000000000 +0400
@@ -334,9 +334,10 @@ char* RTSPClient::describeURL(char const
 	while (numExtraBytesNeeded > 0) {
 	  struct sockaddr_in fromAddress;
 	  char* ptr = &firstLine[bytesRead];
+	  struct timeval timeout2 = {timeout, 0};
 	  int bytesRead2 = readSocket(envir(), fInputSocketNum, (unsigned char*)ptr,
-				      numExtraBytesNeeded, fromAddress);
-	  if (bytesRead2 < 0) break;
+				      numExtraBytesNeeded, fromAddress, timeout ? &timeout2 : NULL);
+	  if (bytesRead2 <= 0) break;
 	  ptr[bytesRead2] = '\0';
 	  if (fVerbosityLevel >= 1) {
 	    envir() << "Read " << bytesRead2 << " extra bytes: "
@@ -1488,7 +1489,7 @@ Boolean RTSPClient::setMediaSessionParam
 
 Boolean RTSPClient::getMediaSessionParameter(MediaSession& /*session*/,
 					     char const* parameterName,
-					     char*& parameterValue) {
+					     char*& parameterValue, Boolean no_reply) {
   parameterValue = NULL; // default result
   Boolean const haveParameterName = parameterName != NULL && parameterName[0] != '\0';
   char* cmd = NULL;
@@ -1558,7 +1559,7 @@ Boolean RTSPClient::getMediaSessionParam
     }
     delete[] authenticatorStr;
 
-    if (!sendRequest(cmd, "GET_PARAMETER")) break;
+    if (!sendRequest(cmd, "GET_PARAMETER") || no_reply) break;
 
     // Get the response from the server:
     // This section was copied/modified from the RTSPClient::describeURL func
diff -urp ../live_orig/liveMedia/include/RTSPClient.hh ./liveMedia/include/RTSPClient.hh
--- ../live_orig/liveMedia/include/RTSPClient.hh	2009-03-23 01:26:16.000000000 +0300
+++ ./liveMedia/include/RTSPClient.hh	2009-04-24 19:24:03.000000000 +0400
@@ -124,9 +124,11 @@ public:
 
   Boolean getMediaSessionParameter(MediaSession& session,
 				   char const* parameterName,
-				   char*& parameterValue);
+				   char*& parameterValue,
+				   Boolean no_reply = False);
       // Issues a RTSP "GET_PARAMETER" command on "subsession".
       // Returns True iff this command succeeds
+	  // use no_reply = True if you dont want reply at all (e.g. keep-alive requests for Windows Media servers)
 
   Boolean teardownMediaSession(MediaSession& session);
       // Issues an aggregate RTSP "TEARDOWN" command on "session".
