From 0bad1c1702ed85db7500755e126592d7672ea20e Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Thu, 5 Jan 2017 17:27:13 +0200 Subject: [PATCH] Add musl-libc compatibility. --- socket.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/socket.c b/socket.c index 4cb19f3..c3baa71 100644 --- a/socket.c +++ b/socket.c @@ -19,6 +19,14 @@ #include "log.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() : socketPortM(0), socketDescM(-1), @@ -289,7 +297,7 @@ int cSatipSocket::ReadMulti(unsigned char *bufferAddrP, unsigned int *elementRec error("%s Invalid parameter(s)", __PRETTY_FUNCTION__); return -1; } -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,12) +#ifndef __SATIP_DISABLE_RECVMMSG__ // Initialize iov and msgh structures struct mmsghdr mmsgh[elementCountP]; struct iovec iov[elementCountP];