pipe: use pa_pipe_buf instead of the macro PIPE_BUF
authorPino Toscano <toscano.pino@tiscali.it>
Mon, 14 Nov 2011 10:33:47 +0000 (11:33 +0100)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 2 Jan 2012 18:50:04 +0000 (00:20 +0530)
This helps when porting to platforms that lack PIPE_BUF.

See bug #42715

src/modules/module-pipe-source.c

index a941f0889af4b93f0f2ffad64e7aeab2145b392f..3335907cd5ded5ca62c8d7ab4040449dbfc06016 100644 (file)
@@ -286,7 +286,7 @@ int pa__init(pa_module*m) {
 
     pa_source_set_asyncmsgq(u->source, u->thread_mq.inq);
     pa_source_set_rtpoll(u->source, u->rtpoll);
-    pa_source_set_fixed_latency(u->source, pa_bytes_to_usec(PIPE_BUF, &u->source->sample_spec));
+    pa_source_set_fixed_latency(u->source, pa_bytes_to_usec(pa_pipe_buf(u->fd), &u->source->sample_spec));
 
     u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
     pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);