aboutsummaryrefslogtreecommitdiffstats
path: root/main/gnome-bluetooth/udev-hwdb.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-04-22 07:10:45 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-04-22 08:58:44 +0000
commit0f2f5081476705912c27f879b543ddd79078bf6e (patch)
treedeb479f509e49bfaf2527a280a2632d2eb916f56 /main/gnome-bluetooth/udev-hwdb.patch
parent5de995de6df5c819bde967a21737eb59805b6110 (diff)
downloadaports-0f2f5081476705912c27f879b543ddd79078bf6e.tar.bz2
aports-0f2f5081476705912c27f879b543ddd79078bf6e.tar.xz
main/gnome-bluetooth: upgrade to 3.12.0
Diffstat (limited to 'main/gnome-bluetooth/udev-hwdb.patch')
-rw-r--r--main/gnome-bluetooth/udev-hwdb.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/main/gnome-bluetooth/udev-hwdb.patch b/main/gnome-bluetooth/udev-hwdb.patch
new file mode 100644
index 0000000000..3fd7cae67c
--- /dev/null
+++ b/main/gnome-bluetooth/udev-hwdb.patch
@@ -0,0 +1,46 @@
+diff --git a/lib/pin.c b/lib/pin.c
+index 61e87ab..fa05599 100644
+--- a/lib/pin.c
++++ b/lib/pin.c
+@@ -40,11 +40,12 @@
+ char *
+ oui_to_vendor (const char *oui)
+ {
++ char *vendor = NULL;
++#if HAVE_UDEV_HWDB_NEW
+ struct udev *udev;
+ struct udev_hwdb *hwdb;
+ struct udev_list_entry *list, *l;
+ char *modalias;
+- char *vendor = NULL;
+
+ if (oui == NULL ||
+ strlen (oui) < 8)
+@@ -81,7 +82,7 @@ bail:
+ g_clear_pointer (&modalias, g_free);
+ g_clear_pointer (&hwdb, udev_hwdb_unref);
+ g_clear_pointer (&udev, udev_unref);
+-
++#endif
+ return vendor;
+ }
+
+@@ -207,7 +208,7 @@ get_pincode_for_device (guint type,
+ data.confirm = TRUE;
+
+ tmp_vendor = oui_to_vendor (address);
+- data.vendor = g_ascii_strdown (tmp_vendor, -1);
++ data.vendor = g_ascii_strdown (tmp_vendor ? tmp_vendor : "unknown", -1);
+ g_free (tmp_vendor);
+
+ ctx = g_markup_parse_context_new (&parser, 0, &data, NULL);
+@@ -227,7 +228,8 @@ get_pincode_for_device (guint type,
+
+ g_debug ("Got pin '%s' (max digits: %d, confirm: %d) for device '%s' (type: %s address: %s, vendor: %s)",
+ data.ret_pin, data.max_digits, data.confirm,
+- name ? name : "", bluetooth_type_to_string (type), address, data.vendor);
++ name ? name : "", bluetooth_type_to_string (type), address,
++ data.vendor ? data.vendor : "unknown");
+
+ g_free (data.vendor);
+