1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

musl-clib compatibility

This commit is contained in:
Christian 2016-12-25 20:25:06 +01:00
parent 20e9dc99f9
commit b078d0d873
2 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@
*
*/
#include <ctype.h>
#include <getopt.h>
#include <vdr/plugin.h>
#include "common.h"

View File

@ -289,6 +289,7 @@ int cSatipSocket::ReadMulti(unsigned char *bufferAddrP, unsigned int *elementRec
error("%s Invalid parameter(s)", __PRETTY_FUNCTION__);
return -1;
}
#if defined(__GLIBC__)
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,12)
// Initialize iov and msgh structures
struct mmsghdr mmsgh[elementCountP];
@ -307,6 +308,7 @@ int cSatipSocket::ReadMulti(unsigned char *bufferAddrP, unsigned int *elementRec
for (int i = 0; i < count; ++i)
elementRecvSizeP[i] = mmsgh[i].msg_len;
#else
#endif
count = 0;
while (count < (int)elementCountP) {
int len = Read(bufferAddrP + count * elementBufferSizeP, elementBufferSizeP);
@ -316,6 +318,8 @@ int cSatipSocket::ReadMulti(unsigned char *bufferAddrP, unsigned int *elementRec
break;
elementRecvSizeP[count++] = len;
}
#if defined(__GLIBC__)
#endif
#endif
debug16("%s Received %d packets size[0]=%d", __PRETTY_FUNCTION__, count, elementRecvSizeP[0]);