From e2876aeb408429b1363080ad77f45690d22e5794 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 file changed, 5 insertions(+) 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) { -- 2.7.4