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
This commit is contained in:
Pino Toscano 2011-11-14 11:48:47 +01:00 committed by Arun Raghavan
parent 992333697f
commit e2876aeb40

View file

@ -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) {