From patchwork Mon Sep 11 07:54:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksander Morgado X-Patchwork-Id: 812244 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="jETUSnA6"; 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 3xrKvs3zsgz9s81 for ; Mon, 11 Sep 2017 17:54:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8A3D0880EA; Mon, 11 Sep 2017 07:54:43 +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 eWyCwGwYcTLD; Mon, 11 Sep 2017 07:54:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id EE2BA880DC; Mon, 11 Sep 2017 07:54:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id F13411C0906 for ; Mon, 11 Sep 2017 07:54:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EB4622C2F9 for ; Mon, 11 Sep 2017 07:54:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pPp886E36gTS for ; Mon, 11 Sep 2017 07:54:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by silver.osuosl.org (Postfix) with ESMTPS id 5B6E425AD8 for ; Mon, 11 Sep 2017 07:54:37 +0000 (UTC) Received: by mail-wm0-f41.google.com with SMTP id f199so32923454wme.0 for ; Mon, 11 Sep 2017 00:54:37 -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; bh=UOREsE4Na8FC8nVb5zu2JEvSSgnBpNQXnOmJG7rJoO4=; b=jETUSnA6Xnj0eSjsnGLs+HX3gaCAC8knacZbai00Wk1KzTCt4nexh5Q8QPtr776kqf SDz5J1F/XtpGm0GWgGeEsYyiYL8z/oO9Pf3Uesgo/v0+w0jo7gw8i9hWMOwuwdAtCAWW D5AXfCx9Yy0d1j99gdBN6ly+rVic2vLRDzSKqETeOP2VGeiIs2A0eZujCUu7ooT0qb+X 7xNlH9916kgZgNvrRj0C03ezL0z7naZPyBIESgqmdLJPArZOAW40IzIZDwxpgGGMPyjp dNJvAVsknYC8TyDHi2ExVAJ8ul99LU//LFqNWpM8xWnz5U3gQlrQVRVdkbAsdnSbT31l +5BQ== 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; bh=UOREsE4Na8FC8nVb5zu2JEvSSgnBpNQXnOmJG7rJoO4=; b=TfhCY1GWxeV2FvFgI2dTyavsPCdBlJiv9KZPje2wOjpQYVTxQQRiErJQN+PbnaM2Ui mqZ5b7B2ceEfO/KzxHXNyaD5SgN0Eiu1f6kS+iA985t2ry6rNV9uxqzCn8X9yvmc10LA 6UOskXLNCa656oxQA+Dg7MbzNv8yqmJY50Vu2f6jPW4ZSDK2qlsuFQEEQfeAg3laHguQ G4cT44w05NZcEnPZ5eYoWqW+ylH2ynsZr0Y12/o9Lo/JVz9rt71fLeIYBvZFYv9/TG7+ 3xxyOubHadmjKcUUGjBfD0dqZnROloYbLBKbwCtBu4hI8fhYnFclgKs09Q+XGS0Ku19z PGJw== X-Gm-Message-State: AHPjjUiSquF+KBRL6tDaHWk8giTIYOaVoNxH0cE+EJuNX6Iu4Z2zvu85 goM4WMH0aiXYY+opYYjqHt+vA/A4G4U= X-Google-Smtp-Source: AOwi7QDCjiu+0MLUsAvGCHgGNjMlZI7ctZmSYNM5eNQ2maSO17umEmCB+PQ1aTkb1qvJpw/LE+ommQ== X-Received: by 10.28.99.69 with SMTP id x66mr7008581wmb.30.1505116475843; Mon, 11 Sep 2017 00:54:35 -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 j65sm4221074wmj.3.2017.09.11.00.54.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 00:54:35 -0700 (PDT) From: Aleksander Morgado To: buildroot@buildroot.org Date: Mon, 11 Sep 2017 09:54:26 +0200 Message-Id: <20170911075426.514-1-aleksander@aleksander.es> X-Mailer: git-send-email 2.13.1 Cc: thomas.petazzoni@free-electrons.com, Aleksander Morgado Subject: [Buildroot] [PATCH] 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 --- ...-prefer-realpath-to-canonicalize_file_nam.patch | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch 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..a13aee547 --- /dev/null +++ b/package/libmbim/0001-mbim-device-prefer-realpath-to-canonicalize_file_nam.patch @@ -0,0 +1,36 @@ +From 48772b32f10523cca22b7d63c3523377279c7427 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) +--- + 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 +