From patchwork Mon Sep 11 08:55:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksander Morgado X-Patchwork-Id: 812258 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aleksander-es.20150623.gappssmtp.com header.i=@aleksander-es.20150623.gappssmtp.com header.b="sbiCfiTe"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xrMGG4GH7z9s7g for ; Mon, 11 Sep 2017 18:55:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id ACA1287ED0; Mon, 11 Sep 2017 08:55:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YsHyovkRxCSn; Mon, 11 Sep 2017 08:55:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id EFB2487EA7; Mon, 11 Sep 2017 08:55:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B9A111C2D90 for ; Mon, 11 Sep 2017 08:55:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B2EE886723 for ; Mon, 11 Sep 2017 08:55:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FVML3q6vR+UO for ; Mon, 11 Sep 2017 08:55:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4861C823E7 for ; Mon, 11 Sep 2017 08:55:38 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id b9so4083349wra.0 for ; Mon, 11 Sep 2017 01:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aleksander-es.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EYZk4Q2W47Bw1XR+JCdtIsKemHI+h9dfoelN/Fd3Nkc=; b=sbiCfiTez4lYtX98Fm0JqiLrtW3C+Umjy+xtWspmfUvbL7H6AWMLLbfjQD1N2dq1IR Axbk1A3A368dk3mYQi6SrqpU66VwmmQ9fx5nIj7qGHYGkmwPGsYRO9A/m0d8QGdACTc0 fKQ7lv2+UDqUoakdzRBg0w4rWeJVy4fnRygVlPjrTHATIlsP5P0Tqyde2l19iBnNWoXH 1L29Ap8qc28iJuIXCFVGGpUOsPyhSjSVsEQVINWGs501jZAku9XjKhMKQKlwOwwh0QTe ybKMEamKk/FY82i0C/oM5h3Savk0+LKIQ0tklL1TmKRS0Wzr1AC4wHyhYih97IQzJKOj MdLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EYZk4Q2W47Bw1XR+JCdtIsKemHI+h9dfoelN/Fd3Nkc=; b=JsYtWuuKq0J9HaTiBqe23+jPli0LRdQHo8ZvcUqqAi8YnM/jWvLbM5HhPKcFLm+omp JaPkrAlt1ZRXLXsq+vvpnuMlcjQwvmxbDeo4XpmZlemZO74N2VBOBQpMTlymFJt/GJBf diVhGgCa/+T95byQbdT0Yh2fCXVSHTFdc8IOemjg3PTzuSAdC+JZX1xJAOipPRoqJcn+ /u9iS1aSPeP8OhBo8mrQGtWN7vwMQGgWSc6u/kzC3KOinOy1NB4G8KJ2sDePNNsbuf2s sNHbhbE2UjTABkudicnPgEcivxwkDMsINcDN4QI+LSu04UxAre5bCSt04uM822nOI+wj GIdQ== X-Gm-Message-State: AHPjjUi7SIksGOlFGehi5NDlV1rnm8G96jtOKyseBRM7UlJ6KdIgWO3i kcXqzYWw54fVoaDqVxaQTQ== X-Google-Smtp-Source: ADKCNb5nveu6Cftqz05XSy61/FwUiSpjiXVDzGFnRS4BLz4hCEvgVfS45nYkEvNzgHLYyx0hm1nblQ== X-Received: by 10.223.132.67 with SMTP id 61mr7889747wrf.152.1505120137255; Mon, 11 Sep 2017 01:55:37 -0700 (PDT) Received: from localhost.localdomain (116.red-83-40-186.dynamicip.rima-tde.net. [83.40.186.116]) by smtp.gmail.com with ESMTPSA id e14sm7331662wra.55.2017.09.11.01.55.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 01:55:36 -0700 (PDT) From: Aleksander Morgado To: buildroot@buildroot.org Date: Mon, 11 Sep 2017 10:55:33 +0200 Message-Id: <20170911085533.4340-1-aleksander@aleksander.es> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170911075426.514-1-aleksander@aleksander.es> References: <20170911075426.514-1-aleksander@aleksander.es> Cc: Aleksander Morgado Subject: [Buildroot] [PATCH v2] libmbim: fix build with musl libc X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This is now failing because the libgudev dependency is optional and the build will only use if it's found during the configure checks. Imported the same patch that has been applied in the upstream libmbim git repository: https://cgit.freedesktop.org/libmbim/libmbim/commit/?id=417b0b80023dc30d61c111ec0a54da2884d3a541 Signed-off-by: Aleksander Morgado --- v2 with Signed-off-by in the patch itself. --- ...-prefer-realpath-to-canonicalize_file_nam.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch -- 2.13.1 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 000000000..ff178dd61 --- /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 +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 +--- + 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 +