[PATCH] revive solaris module

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

 




On Tue, 31 Mar 2009, Lennart Poettering wrote:

[snip]
> 
> I have now merged your patch. I had to change a few things to make it 
> apply cleanly. Since I have no access to Solaris I am unable to test 
> this though, so please check if things still work for you.
> 
> I also worked around the realpath() issue mostly. It should work fine on 
> Solaris now, as well.

Thanks. 0.9.15-test7 seems to work fine.

The only new issue is that configure --without-dbus no longer builds. I 
don't need dbus for my purposes (network audio server) and it seems that 
dbus is not included with Solaris. A patch for this follows.

Finn

> Thanks again for your contributions.
> 
> Lennart
> 
> 


diff -ru pulseaudio-0.9.15-test7.orig/src/pulse/context.c pulseaudio-0.9.15-test7/src/pulse/context.c
--- pulseaudio-0.9.15-test7.orig/src/pulse/context.c	Tue Mar 31 09:31:39 2009
+++ pulseaudio-0.9.15-test7/src/pulse/context.c	Thu Apr  2 18:16:00 2009
@@ -104,7 +104,10 @@
     [PA_COMMAND_RECORD_BUFFER_ATTR_CHANGED] = pa_command_stream_buffer_attr
 };
 static void context_free(pa_context *c);
+
+#ifdef HAVE_DBUS
 static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, void *userdata);
+#endif
 
 pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name) {
     return pa_context_new_with_proplist(mainloop, name, NULL);
@@ -144,7 +147,9 @@
     if (name)
         pa_proplist_sets(c->proplist, PA_PROP_APPLICATION_NAME, name);
 
+#ifdef HAVE_DBUS
     c->system_bus = c->session_bus = NULL;
+#endif
     c->mainloop = mainloop;
     c->client = NULL;
     c->pstream = NULL;
@@ -241,6 +246,7 @@
 
     context_unlink(c);
 
+#ifdef HAVE_DBUS
     if (c->system_bus) {
         dbus_connection_remove_filter(pa_dbus_wrap_connection_get(c->system_bus), filter_cb, c);
         pa_dbus_wrap_connection_free(c->system_bus);
@@ -250,6 +256,7 @@
         dbus_connection_remove_filter(pa_dbus_wrap_connection_get(c->session_bus), filter_cb, c);
         pa_dbus_wrap_connection_free(c->session_bus);
     }
+#endif
 
     if (c->record_streams)
         pa_dynarray_free(c->record_streams, NULL, NULL);
@@ -742,6 +749,7 @@
 
 static void on_connection(pa_socket_client *client, pa_iochannel*io, void *userdata);
 
+#ifdef HAVE_DBUS
 static void track_pulseaudio_on_dbus(pa_context *c, DBusBusType type, pa_dbus_wrap_connection **conn) {
     DBusError error;
 
@@ -767,6 +775,7 @@
  finish:
     dbus_error_free(&error);
 }
+#endif
 
 static int try_next_connection(pa_context *c) {
     char *u = NULL;
@@ -800,6 +809,7 @@
             }
 #endif
 
+#ifdef HAVE_DBUS
             if (c->no_fail && !c->server_specified) {
                 if (!c->system_bus)
                     track_pulseaudio_on_dbus(c, DBUS_BUS_SYSTEM, &c->system_bus);
@@ -806,6 +816,7 @@
                 if (!c->session_bus)
                     track_pulseaudio_on_dbus(c, DBUS_BUS_SESSION, &c->session_bus);
             } else
+#endif
                 pa_context_fail(c, PA_ERR_CONNECTIONREFUSED);
 
             goto finish;
@@ -864,6 +875,7 @@
     pa_context_unref(c);
 }
 
+#ifdef HAVE_DBUS
 static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, void *userdata) {
     pa_context *c = userdata;
     pa_bool_t is_session;
@@ -895,6 +909,7 @@
 finish:
     return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 }
+#endif
 
 int pa_context_connect(
         pa_context *c,
diff -ru pulseaudio-0.9.15-test7.orig/src/pulse/internal.h pulseaudio-0.9.15-test7/src/pulse/internal.h
--- pulseaudio-0.9.15-test7.orig/src/pulse/internal.h	Wed Apr  1 07:33:15 2009
+++ pulseaudio-0.9.15-test7/src/pulse/internal.h	Thu Apr  2 18:16:00 2009
@@ -42,7 +42,9 @@
 #include <pulsecore/hashmap.h>
 #include <pulsecore/refcnt.h>
 #include <pulsecore/time-smoother.h>
+#ifdef HAVE_DBUS
 #include <pulsecore/dbus-util.h>
+#endif
 
 #include "client-conf.h"
 
@@ -51,8 +53,10 @@
 struct pa_context {
     PA_REFCNT_DECLARE;
 
+#ifdef HAVE_DBUS
     pa_dbus_wrap_connection *system_bus;
     pa_dbus_wrap_connection *session_bus;
+#endif
 
     pa_proplist *proplist;
     pa_mainloop_api* mainloop;



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux