aboutsummaryrefslogtreecommitdiff
path: root/package/libmbim
diff options
context:
space:
mode:
authorGravatar Aleksander Morgado <aleksander@aleksander.es>2017-09-11 10:55:33 +0200
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2017-09-23 22:19:36 +0200
commit6e271944f937faa1a31756638d50a904bde21d1a (patch)
tree865ce540edca137c5cd1e13f6dfdae30595e7e20 /package/libmbim
parent9b7111a1e2d6a91a56e583707597f4f35aeea3bc (diff)
downloadbuildroot-6e271944f937faa1a31756638d50a904bde21d1a.tar.gz
buildroot-6e271944f937faa1a31756638d50a904bde21d1a.tar.bz2
libmbim: fix build with musl libc
Patch applied upstream: https://cgit.freedesktop.org/libmbim/libmbim/commit/?id=417b0b80023dc30d61c111ec0a54da2884d3a541 Fixes: http://autobuild.buildroot.net/results/dc1/dc11a3dfd18bb7f5078de00412de82de3cce3c48 Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> [Arnout: rework commit message] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'package/libmbim')
-rw-r--r--package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch b/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch
new file mode 100644
index 0000000000..1a72b618af
--- /dev/null
+++ b/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch
@@ -0,0 +1,37 @@
+From 6b043b9b676e88a80e3d4013863c5e970fdde1df Mon Sep 17 00:00:00 2001
+From: Aleksander Morgado <aleksander@aleksander.es>
+Date: Mon, 11 Sep 2017 09:31:03 +0200
+Subject: [PATCH] mbim-device: prefer realpath() to canonicalize_file_name()
+
+Usually the canonicalize_file_name() GNU extension is preferred to the
+POSIX realpath(), as it covers some of the limitations the latter has.
+But this extension isn't available in lots of platforms or in other
+c library implementations (e.g. musl), so just default to the POSIX
+method to improve portability.
+
+Note that the check for canonicalize_file_name() availability during
+configure isn't as trivial as adding a new AC_CHECK_FUNCS(), and
+importing a gnulib module seems overkill just for this one liner.
+
+(cherry picked from commit 417b0b80023dc30d61c111ec0a54da2884d3a541)
+Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
+---
+ src/libmbim-glib/mbim-device.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c
+index e1f32a6..20e64af 100644
+--- a/src/libmbim-glib/mbim-device.c
++++ b/src/libmbim-glib/mbim-device.c
+@@ -867,7 +867,7 @@ get_descriptors_filepath (MbimDevice *self)
+ * /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:2.0
+ */
+ tmp = g_strdup_printf ("/sys/class/%s/%s/device", subsystems[i], device_basename);
+- path = canonicalize_file_name (tmp);
++ path = realpath (tmp, NULL);
+ g_free (tmp);
+
+ if (g_file_test (path, G_FILE_TEST_EXISTS)) {
+--
+2.13.1
+