libqmi: fix patch for canonicalize_file_name() issue
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 4 May 2017 19:33:49 +0000 (21:33 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 4 May 2017 19:35:42 +0000 (21:35 +0200)
The patch added in commit c78b65c4f161ec101ff02880788ef22eb7c87d76 was
bogus: it adds some code conditionally on HAVE_CANONICALIZE_FILE_NAME
being undefined, but there is nothing that defines
HAVE_CANONICALIZE_FILE_NAME if canonicalize_file_name() is already
provided by the C library.

This commit fixes that by adding the appropriate autoconf check.

Fixes:

  http://autobuild.buildroot.net/results/4f0eb2af09c92ff4cd7448211ffda432754d4e60/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libqmi/0001-musl-compat-canonicalize_file_name.patch
package/libqmi/libqmi.mk

index 5656d55fc1d3c4e3943765030700530c2a1c6917..fd606d805114cb637ab563f4a670e349ee367ee2 100644 (file)
@@ -1,4 +1,4 @@
-From 2f44edc9fbcbf2202174aec723e8a8d191c13d2f Mon Sep 17 00:00:00 2001
+From 85863c9e051fe59add4e47dbfcb37072234f0110 Mon Sep 17 00:00:00 2001
 From: Matt Weber <matthew.weber@rockwellcollins.com>
 Date: Mon, 1 May 2017 19:55:07 -0500
 Subject: [PATCH] musl compat canonicalize_file_name()
@@ -11,9 +11,23 @@ https://bugs.freedesktop.org/show_bug.cgi?id=99944
 
 Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
 ---
+ configure.ac                |  2 ++
  src/libqmi-glib/qmi-utils.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
2 files changed, 20 insertions(+)
 
+diff --git a/configure.ac b/configure.ac
+index 162d5ae..9cb82fd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -80,6 +80,8 @@ AC_SUBST(GLIB_LIBS)
+ GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
+ AC_SUBST(GLIB_MKENUMS)
++AC_CHECK_FUNCS([canonicalize_file_name])
++
+ dnl qmi-firmware-update is optional, enabled by default
+ AC_ARG_ENABLE([firmware-update],
+               AS_HELP_STRING([--enable-firmware-update],
 diff --git a/src/libqmi-glib/qmi-utils.h b/src/libqmi-glib/qmi-utils.h
 index 4fd5199..4869da5 100644
 --- a/src/libqmi-glib/qmi-utils.h
@@ -44,5 +58,5 @@ index 4fd5199..4869da5 100644
  
  G_BEGIN_DECLS
 -- 
-1.9.1
+2.7.4
 
index 92b635d5cc416c7dde8b8218debee1a1ad72179f..917265f4b6ef1ec61c0a26760617003bba5cb941 100644 (file)
@@ -10,6 +10,8 @@ LIBQMI_SOURCE = libqmi-$(LIBQMI_VERSION).tar.xz
 LIBQMI_LICENSE = LGPL-2.0+ (library), GPL-2.0+ (programs)
 LIBQMI_LICENSE_FILES = COPYING
 LIBQMI_INSTALL_STAGING = YES
+# 0001-musl-compat-canonicalize_file_name.patch
+LIBQMI_AUTORECONF = YES
 
 LIBQMI_DEPENDENCIES = libglib2