diff options
author | hans <hans@pkgsrc.org> | 2011-10-12 20:12:35 +0000 |
---|---|---|
committer | hans <hans@pkgsrc.org> | 2011-10-12 20:12:35 +0000 |
commit | d380edf1800bcaee5f05e5f3b7c2857ffc724402 (patch) | |
tree | 8ea4f19d240db0c1ddea2270eb840e7b447b9989 /audio | |
parent | 069f12b67f9d8a2953f2a39f5f0b02223917ef15 (diff) | |
download | pkgsrc-d380edf1800bcaee5f05e5f3b7c2857ffc724402.tar.gz |
Fix build on SunOS 5.10 by #ifdefing the code using SO_TIMESTAMP.
Add the patches that I forgot in the previous commit.
Diffstat (limited to 'audio')
3 files changed, 74 insertions, 0 deletions
diff --git a/audio/pulseaudio/patches/patch-src_modules_bluetooth_module-bluetooth-device.c b/audio/pulseaudio/patches/patch-src_modules_bluetooth_module-bluetooth-device.c new file mode 100644 index 00000000000..263dbca4ac3 --- /dev/null +++ b/audio/pulseaudio/patches/patch-src_modules_bluetooth_module-bluetooth-device.c @@ -0,0 +1,34 @@ +$NetBSD: patch-src_modules_bluetooth_module-bluetooth-device.c,v 1.1 2011/10/12 20:12:35 hans Exp $ + +--- src/modules/bluetooth/module-bluetooth-device.c.orig Wed Nov 11 05:11:07 2009 ++++ src/modules/bluetooth/module-bluetooth-device.c Tue Oct 11 19:23:10 2011 +@@ -781,9 +781,11 @@ + pa_make_fd_nonblock(u->stream_fd); + pa_make_socket_low_delay(u->stream_fd); + ++#ifdef SO_TIMESTAMP + one = 1; + if (setsockopt(u->stream_fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one)) < 0) + pa_log_warn("Failed to enable SO_TIMESTAMP: %s", pa_cstrerror(errno)); ++#endif + + pa_log_debug("Stream properly set up, we're ready to roll!"); + +@@ -1104,6 +1106,7 @@ + memchunk.length = (size_t) l; + u->read_index += (uint64_t) l; + ++#ifdef SO_TIMESTAMP + for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm)) + if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SO_TIMESTAMP) { + struct timeval *tv = (struct timeval*) CMSG_DATA(cm); +@@ -1117,6 +1120,9 @@ + pa_log_warn("Couldn't find SO_TIMESTAMP data in auxiliary recvmsg() data!"); + tstamp = pa_rtclock_now(); + } ++#else ++ tstamp = pa_rtclock_now(); ++#endif + + pa_smoother_put(u->read_smoother, tstamp, pa_bytes_to_usec(u->read_index, &u->sample_spec)); + pa_smoother_resume(u->read_smoother, tstamp, TRUE); diff --git a/audio/pulseaudio/patches/patch-src_modules_rtp_module-rtp-recv.c b/audio/pulseaudio/patches/patch-src_modules_rtp_module-rtp-recv.c new file mode 100644 index 00000000000..4f5e721a324 --- /dev/null +++ b/audio/pulseaudio/patches/patch-src_modules_rtp_module-rtp-recv.c @@ -0,0 +1,18 @@ +$NetBSD: patch-src_modules_rtp_module-rtp-recv.c,v 1.1 2011/10/12 20:12:35 hans Exp $ + +--- src/modules/rtp/module-rtp-recv.c.orig Mon Nov 23 04:57:06 2009 ++++ src/modules/rtp/module-rtp-recv.c Tue Oct 11 19:21:12 2011 +@@ -397,11 +397,13 @@ + + 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; + } ++#endif + + one = 1; + if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) { diff --git a/audio/pulseaudio/patches/patch-src_modules_rtp_rtp.c b/audio/pulseaudio/patches/patch-src_modules_rtp_rtp.c new file mode 100644 index 00000000000..caf868c384f --- /dev/null +++ b/audio/pulseaudio/patches/patch-src_modules_rtp_rtp.c @@ -0,0 +1,22 @@ +$NetBSD: patch-src_modules_rtp_rtp.c,v 1.1 2011/10/12 20:12:35 hans Exp $ + +--- ./src/modules/rtp/rtp.c.orig Mon Jun 8 21:21:21 2009 ++++ ./src/modules/rtp/rtp.c Tue Oct 11 19:19:50 2011 +@@ -278,6 +278,7 @@ + pa_memchunk_reset(&c->memchunk); + } + ++#ifdef SO_TIMESTAMP + for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm)) { + if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SO_TIMESTAMP) + memcpy(tstamp, CMSG_DATA(cm), sizeof(struct timeval)); +@@ -289,6 +290,9 @@ + pa_log_warn("Couldn't find SO_TIMESTAMP data in auxiliary recvmsg() data!"); + memset(tstamp, 0, sizeof(tstamp)); + } ++#else ++ memset(tstamp, 0, sizeof(tstamp)); ++#endif + + return 0; + |