[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.19-255-g4923f3c

Lennart Poettering gitmailer-noreply at 0pointer.de
Fri Nov 20 14:31:06 PST 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  6daf112ce0116e7edacd83c538e5c3099c90a774 (commit)

- Log -----------------------------------------------------------------
4923f3c Include sys/filio.h if present; this makes use of FIONREAD on Solaris.
09a58b6 Don't declare the variable l if FIONREAD is not defined.
71ebbfb Fix build on Solaris: pass the third parameter to pa_cloexec_open.
70ba21e Move the platform-specific defines after the compiler has been found.
-----------------------------------------------------------------------

Summary of changes:
 configure.ac                     |   26 +++++++++++++-------------
 src/modules/module-pipe-sink.c   |    7 ++++++-
 src/modules/module-pipe-source.c |    7 ++++++-
 src/modules/module-solaris.c     |    2 +-
 4 files changed, 26 insertions(+), 16 deletions(-)

-----------------------------------------------------------------------

commit 70ba21e78a90b60f38ce524c49907b1f5daa2fba
Author: Diego Elio 'Flameeyes' Pettenò <flameeyes at gmail.com>
Date:   Fri Nov 20 21:08:05 2009 +0100

    Move the platform-specific defines after the compiler has been found.
    
    Without this change, on OpenSolaris, it's possible that the compiler will
    be reported, by default, as failing to produce executables, since
    _XOPEN_SOURCE=600 requires a C99 compiler to compile even the simples of
    the programs.

diff --git a/configure.ac b/configure.ac
index 2bc068e..a3a97a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,19 +66,6 @@ if type -p stow > /dev/null && test -d /usr/local/stow ; then
    ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
 fi
 
-#### Platform hacks ####
-
-case $host in
-   *-*-solaris* )
-      AC_DEFINE(_XOPEN_SOURCE,        600, Needed to get declarations for msg_control and msg_controllen on Solaris)
-      AC_DEFINE(__EXTENSIONS__,         1, Needed to get declarations for msg_control and msg_controllen on Solaris)
-      ;;
-   *-*-darwin* )
-      AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X])
-      AC_DEFINE([_DARWIN_C_SOURCE], [200112L], [Needed to get NSIG on Mac OS X])
-      ;;
-esac
-
 AM_SILENT_RULES([yes])
 
 #### Checks for programs. ####
@@ -95,6 +82,19 @@ AM_PROG_CC_C_O
 AC_PROG_GCC_TRADITIONAL
 AC_USE_SYSTEM_EXTENSIONS
 
+#### Platform hacks ####
+
+case $host in
+   *-*-solaris* )
+      AC_DEFINE(_XOPEN_SOURCE,        600, Needed to get declarations for msg_control and msg_controllen on Solaris)
+      AC_DEFINE(__EXTENSIONS__,         1, Needed to get declarations for msg_control and msg_controllen on Solaris)
+      ;;
+   *-*-darwin* )
+      AC_DEFINE([_POSIX_C_SOURCE], [200112L], [Needed to get clock_gettime on Mac OS X])
+      AC_DEFINE([_DARWIN_C_SOURCE], [200112L], [Needed to get NSIG on Mac OS X])
+      ;;
+esac
+
 # M4
 
 AC_CHECK_PROGS([M4], gm4 m4, no)

commit 71ebbfb6ef0a8c368b9c424c3be4fda2519a5770
Author: Diego Elio 'Flameeyes' Pettenò <flameeyes at gmail.com>
Date:   Fri Nov 20 21:22:24 2009 +0100

    Fix build on Solaris: pass the third parameter to pa_cloexec_open.

diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index 955997b..396094c 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -327,7 +327,7 @@ static int open_audio_device(struct userdata *u, pa_sample_spec *ss) {
     pa_assert(u);
     pa_assert(ss);
 
-    if ((u->fd = pa_open_cloexec(u->device_name, u->mode | O_NONBLOCK)) < 0) {
+    if ((u->fd = pa_open_cloexec(u->device_name, u->mode | O_NONBLOCK, 0)) < 0) {
         pa_log_warn("open %s failed (%s)", u->device_name, pa_cstrerror(errno));
         return -1;
     }

commit 09a58b6813c078a64cf61be4d2ba98e26b4c88b3
Author: Diego Elio 'Flameeyes' Pettenò <flameeyes at gmail.com>
Date:   Fri Nov 20 21:24:46 2009 +0100

    Don't declare the variable l if FIONREAD is not defined.
    
    This avoids two warnings due to FIONREAD not being defined.

diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index 10cc341..f06d1ee 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -101,9 +101,10 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
 
         case PA_SINK_MESSAGE_GET_LATENCY: {
             size_t n = 0;
-            int l;
 
 #ifdef FIONREAD
+            int l;
+
             if (ioctl(u->fd, FIONREAD, &l) >= 0 && l > 0)
                 n = (size_t) l;
 #endif
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index de68093..c5eba43 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -105,9 +105,10 @@ static int source_process_msg(
 
         case PA_SOURCE_MESSAGE_GET_LATENCY: {
             size_t n = 0;
-            int l;
 
 #ifdef FIONREAD
+            int l;
+
             if (ioctl(u->fd, FIONREAD, &l) >= 0 && l > 0)
                 n = (size_t) l;
 #endif

commit 4923f3ca773662b2d147bc374995571b5dacdc7f
Author: Diego Elio 'Flameeyes' Pettenò <flameeyes at gmail.com>
Date:   Fri Nov 20 21:25:33 2009 +0100

    Include sys/filio.h if present; this makes use of FIONREAD on Solaris.
    
    FIONREAD on OpenSolaris is declared in sys/filio.h. The RTP modules already
    rely on the presence of FIONREAD, and check for the header, so this brings
    the pipe source and sink modules on par with them.

diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index f06d1ee..7a4e730 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -34,6 +34,10 @@
 #include <sys/ioctl.h>
 #include <poll.h>
 
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
+
 #include <pulse/xmalloc.h>
 
 #include <pulsecore/core-error.h>
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index c5eba43..933f029 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -34,6 +34,10 @@
 #include <sys/ioctl.h>
 #include <sys/poll.h>
 
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
+
 #include <pulse/xmalloc.h>
 
 #include <pulsecore/core-error.h>

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list