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:
parent
20e9dc99f9
commit
b078d0d873
1
satip.c
1
satip.c
@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <vdr/plugin.h>
|
#include <vdr/plugin.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
4
socket.c
4
socket.c
@ -289,6 +289,7 @@ int cSatipSocket::ReadMulti(unsigned char *bufferAddrP, unsigned int *elementRec
|
|||||||
error("%s Invalid parameter(s)", __PRETTY_FUNCTION__);
|
error("%s Invalid parameter(s)", __PRETTY_FUNCTION__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
#if defined(__GLIBC__)
|
||||||
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,12)
|
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,12)
|
||||||
// Initialize iov and msgh structures
|
// Initialize iov and msgh structures
|
||||||
struct mmsghdr mmsgh[elementCountP];
|
struct mmsghdr mmsgh[elementCountP];
|
||||||
@ -307,6 +308,7 @@ int cSatipSocket::ReadMulti(unsigned char *bufferAddrP, unsigned int *elementRec
|
|||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
elementRecvSizeP[i] = mmsgh[i].msg_len;
|
elementRecvSizeP[i] = mmsgh[i].msg_len;
|
||||||
#else
|
#else
|
||||||
|
#endif
|
||||||
count = 0;
|
count = 0;
|
||||||
while (count < (int)elementCountP) {
|
while (count < (int)elementCountP) {
|
||||||
int len = Read(bufferAddrP + count * elementBufferSizeP, elementBufferSizeP);
|
int len = Read(bufferAddrP + count * elementBufferSizeP, elementBufferSizeP);
|
||||||
@ -316,6 +318,8 @@ int cSatipSocket::ReadMulti(unsigned char *bufferAddrP, unsigned int *elementRec
|
|||||||
break;
|
break;
|
||||||
elementRecvSizeP[count++] = len;
|
elementRecvSizeP[count++] = len;
|
||||||
}
|
}
|
||||||
|
#if defined(__GLIBC__)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
debug16("%s Received %d packets size[0]=%d", __PRETTY_FUNCTION__, count, elementRecvSizeP[0]);
|
debug16("%s Received %d packets size[0]=%d", __PRETTY_FUNCTION__, count, elementRecvSizeP[0]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user