patches/sound-juicer-02-dev.diff
author yippi
Thu, 31 May 2012 20:16:52 +0000
changeset 22481 1ff6784d9b6f
parent 18021 e075e2d33149
permissions -rw-r--r--
2012-05-31 Brian Cameron <[email protected]> * base-specs/shared-mime-info.spec: Bump to 1.0. * base-specs/nautilus.spec, base-specs/pulseaudio.spec, base-specs/gnome-settings-daemon.spec, specs/SUNWdconf.spec: Add patch comments. * base-specs/gnome-panel.spec: Add --disable-telepathy-glib so it does not build with this module we do not deliver.

--- sound-juicer-2.23.2/src/sj-main.c.old	Fri Aug 29 16:29:11 2008
+++ sound-juicer-2.23.2/src/sj-main.c	Fri Aug 29 16:29:27 2008
@@ -1814,8 +1814,14 @@
   if (device == NULL && uris == NULL) {
     device_changed_cb (gconf_client, -1, gconf_client_get_entry (gconf_client, GCONF_DEVICE, NULL, TRUE, NULL), GINT_TO_POINTER (TRUE));
   } else {
-    if (device)
+    if (device) {
+#ifdef __sun
+      if (strstr(device, "/dev/dsk/") != NULL ) {
+        device = g_strdup_printf("/dev/rdsk/%s", device + strlen("/dev/dsk/"));
+      }
+#endif
       set_device (device, TRUE);
+    }
     else {
       char *d;
 
@@ -1827,7 +1827,11 @@
       /* Mash up the CDDA URIs into a device path */
       if (g_str_has_prefix (uris[0], "cdda://")) {
       	gint len;
+#ifdef __sun
+        d = g_strdup_printf ("/dev/rdsk/%s", uris[0] + strlen ("cdda://"));
+#else
         d = g_strdup_printf ("/dev/%s%c", uris[0] + strlen ("cdda://"), '\0');
+#endif
         /* Take last '/' out of path, or set_device thinks it is part of the device name */
 		len = strlen (d);
 		if (d[len - 1] == '/')