Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[pvr.nextpvr] - fixed compilation for darwin and refactor the ifdefs …

…a bit
  • Loading branch information...
commit 1527fc067f924f3d9e0164876d8affd0f6023c15 1 parent 8fc9b12
@Memphiz Memphiz authored
View
6 addons/pvr.nextpvr/src/Socket.cpp
@@ -440,11 +440,11 @@ int Socket::receive ( char* data, const unsigned int buffersize, const unsigned
if ( status == SOCKET_ERROR )
{
int lasterror = getLastError();
-#if defined(TARGET_LINUX) || defined(TARGET_OSX)
- if ( lasterror != EAGAIN && lasterror != EWOULDBLOCK )
+#if defined(TARGET_WINDOWS)
+ if ( lasterror != WSAEWOULDBLOCK)
errormessage( lasterror, "Socket::receive" );
#else
- if ( lasterror != WSAEWOULDBLOCK)
+ if ( lasterror != EAGAIN && lasterror != EWOULDBLOCK )
errormessage( lasterror, "Socket::receive" );
#endif
return status;
View
12 addons/pvr.nextpvr/src/pvrclient-nextpvr.cpp
@@ -1144,10 +1144,10 @@ int cPVRClientNextPVR::ReadLiveStream(unsigned char *pBuffer, unsigned int iBuff
}
else
{
-#if defined(TARGET_LINUX) || defined(TARGET_OSX)
- usleep(5000);
-#else
+#if defined(TARGET_WINDOWS)
Sleep(5);
+#else
+ usleep(5000);
#endif
}
}
@@ -1530,10 +1530,10 @@ int cPVRClientNextPVR::DoRequest(const char *resource, CStdString &response)
}
else
{
-#if defined(TARGET_LINUX) || defined(TARGET_OSX)
- usleep(50000);
-#else
+#if defined(TARGET_WINDOWS)
Sleep(50);
+#else
+ usleep(50000);
#endif
delayed += 50;
}
Please sign in to comment.
Something went wrong with that request. Please try again.