From e5b5ae7a95b9302a667f0687a00d5ce2cdc4f5a6 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 14 Nov 2011 11:48:47 +0100 Subject: [PATCH] module-rtp-recv: fail when SO_TIMESTAMP is not defined SO_TIMESTAMP is not POSIX and not available in any platform, so just fail if the current platform does not have it. See bug #42715 --- src/modules/rtp/module-rtp-recv.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c index 9d86805..412f4c3 100644 --- a/src/modules/rtp/module-rtp-recv.c +++ b/src/modules/rtp/module-rtp-recv.c @@ -428,11 +428,16 @@ static int mcast_socket(const struct sockaddr* sa, socklen_t salen) { pa_make_udp_socket_low_delay(fd); +#ifdef SO_TIMESTAMP one = 1; if (setsockopt(fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one)) < 0) { pa_log("SO_TIMESTAMP failed: %s", pa_cstrerror(errno)); goto fail; } +#else + pa_log("SO_TIMESTAMP unsupported on this platform"); + goto fail; +#endif one = 1; if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) { -- 1.7.7