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

Add musl-libc compatibility.

This commit is contained in:
Rolf Ahrenberg 2017-01-05 17:27:13 +02:00
parent 20e9dc99f9
commit 941a13b794

View File

@ -19,6 +19,14 @@
#include "log.h" #include "log.h"
#include "socket.h" #include "socket.h"
#if defined(__GLIBC__)
#if defined(__GLIBC_PREREQ)
#if !__GLIBC_PREREQ(2,12)
#define __SATIP_DISABLE_RECVMMSG__
#endif
#endif
#endif
cSatipSocket::cSatipSocket() cSatipSocket::cSatipSocket()
: socketPortM(0), : socketPortM(0),
socketDescM(-1), socketDescM(-1),
@ -289,7 +297,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_PREREQ) && __GLIBC_PREREQ(2,12) #ifndef __SATIP_DISABLE_RECVMMSG__
// Initialize iov and msgh structures // Initialize iov and msgh structures
struct mmsghdr mmsgh[elementCountP]; struct mmsghdr mmsgh[elementCountP];
struct iovec iov[elementCountP]; struct iovec iov[elementCountP];