@@ -37,6 +37,10 @@ int
recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
const struct timespec *tmo)
{
+ struct timespec dummy;
+ memcpy (&dummy, tmo, sizeof (struct timespec));
+ tmo = &dummy;
+
if (SINGLE_THREAD_P)
return INLINE_SYSCALL (recvmmsg, 5, fd, vmessages, vlen, flags, tmo);
@@ -61,6 +65,10 @@ int
recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
const struct timespec *tmo)
{
+ struct timespec dummy;
+ memcpy (&dummy, tmo, sizeof (struct timespec));
+ tmo = &dummy;
+
if (__glibc_likely (have_recvmmsg >= 0))
{
int ret = __internal_recvmmsg (fd, vmessages, vlen, flags, tmo);