pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/pulseaudio/patches Fix build on SunOS 5.10 by #i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d11f2504b845
branches:  trunk
changeset: 593728:d11f2504b845
user:      hans <hans%pkgsrc.org@localhost>
date:      Wed Oct 12 20:12:35 2011 +0000

description:
Fix build on SunOS 5.10 by #ifdefing the code using SO_TIMESTAMP.

Add the patches that I forgot in the previous commit.

diffstat:

 audio/pulseaudio/patches/patch-src_modules_bluetooth_module-bluetooth-device.c |  34 ++++++++++
 audio/pulseaudio/patches/patch-src_modules_rtp_module-rtp-recv.c               |  18 +++++
 audio/pulseaudio/patches/patch-src_modules_rtp_rtp.c                           |  22 ++++++
 3 files changed, 74 insertions(+), 0 deletions(-)

diffs (86 lines):

diff -r caef31d881c7 -r d11f2504b845 audio/pulseaudio/patches/patch-src_modules_bluetooth_module-bluetooth-device.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/pulseaudio/patches/patch-src_modules_bluetooth_module-bluetooth-device.c    Wed Oct 12 20:12:35 2011 +0000
@@ -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 -r caef31d881c7 -r d11f2504b845 audio/pulseaudio/patches/patch-src_modules_rtp_module-rtp-recv.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/pulseaudio/patches/patch-src_modules_rtp_module-rtp-recv.c  Wed Oct 12 20:12:35 2011 +0000
@@ -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 -r caef31d881c7 -r d11f2504b845 audio/pulseaudio/patches/patch-src_modules_rtp_rtp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/pulseaudio/patches/patch-src_modules_rtp_rtp.c      Wed Oct 12 20:12:35 2011 +0000
@@ -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;
+ 



Home | Main Index | Thread Index | Old Index