From patchwork Fri Jun 15 03:31:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 138650 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp313043lji; Thu, 14 Jun 2018 20:31:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKFtp/T7FLo7HuGHGlCadyoNVzqaFkzMs1KL3D/aEMYUc4pzONb+TC/2rAk5/wg33v0T0P8 X-Received: by 2002:a63:91c8:: with SMTP id l191-v6mr4641815pge.53.1529033496673; Thu, 14 Jun 2018 20:31:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529033496; cv=none; d=google.com; s=arc-20160816; b=qdLuaAa+oPXILqisQwzDomOGyDneMABx+wgs7da+3N+biFmh2P3CZMYAzFP86AzK1E /YU4eDhArddeZ5xgDTJQQiQ+6xjRgmZaD/ZRW/9sZxMpPP9+Mi6QmQaFaTKmbksnPgb/ lUfQra6bW7wcs93/DH/oC1JJae07lgBi+3xBDVNbwXG7AfIM5FBQ2ul7+J9rUToL1Rba MSrinbignhUVYkXuWR70ZDz7Obra5CA/UUG/t2B6gHP1YlUYxH2V8N7CTPI6eQqL4Bbz UsH1ncvxuwwe7gotO81ipNASi6bh6U/kHtgh1JTdVIjBABvihRR7YVIncFIVwotwHqzc 6btQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=Bdw32lMpPqMAF01EPvqXdSPcrc33D58kobcrUa0ISiY=; b=wMt1VPcULde/PgxMkn9iBf2SalDOuvIdw1RxCHQkfh1dPkkPyAovN+HB4l/3Kuro8v 6vRn+myzL8L1cC2Z0OK67E0sULIZ6T4qKeTjoYOXMsJnxQHBJU0TVWG1GxA11w1fmgjc UqWnjsu3LGvcFV6gT1+quczPC59BNPFqx3rYeqYrAoxPPzMXHHBoqa5f6Pehpa66g0k8 pw0aHyhYCQ66Pq15qydYzNGgX2riljYwytoB7vZojV7xqXIOqAV4+PDAZVjYKpcTrOFn w29LiaMJTiJrCNbLv6lvVr2u724Pbs8UakobPGmOTaJJofOpNVzhbDkwZiSrzfAdOJT9 +m0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cEj2VDwM; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id u22-v6si6653476pfg.62.2018.06.14.20.31.28; Thu, 14 Jun 2018 20:31:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cEj2VDwM; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 64019755C0; Fri, 15 Jun 2018 03:31:25 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pl0-f51.google.com (mail-pl0-f51.google.com [209.85.160.51]) by mail.openembedded.org (Postfix) with ESMTP id 363AB75479 for ; Fri, 15 Jun 2018 03:31:05 +0000 (UTC) Received: by mail-pl0-f51.google.com with SMTP id 30-v6so4616904pld.13 for ; Thu, 14 Jun 2018 20:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SEHUCTbIzKGQhNhEh+ORmi5MfB3W2dAG0v3gddrQ5KA=; b=cEj2VDwMORPLOyji/nY+CafplP5Z9YnB6OOi0+d3zF9s+wP8TFpAVHCmo9IxqZpGLf ktUwYafHMf5u136w2APXOgzCDygQuG1mvque0aKrTjdvIYVOcggxq2u/gACU5jpiiGjA p2g2CGznvSphDhcTkRVTT5IiK0xJlwP9IvQRJnB9VbTOSY41njSXyESfgIQxqrklU6A+ mzChnG7TWVbykN7S+/AT3ywgVJrScc/bwgzIWovPA3jjAEBC4Gyc0iwFDeTxemOb8t5h GUAIWB7s1e2qOf4oJs2F/u6LbHAhaM7gwxtD0yRMK9gUV6zANCW8vbOhUkzPSKYeGwW2 bBfw== 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=SEHUCTbIzKGQhNhEh+ORmi5MfB3W2dAG0v3gddrQ5KA=; b=KKy2mPfyVPz9qbFzek2Fx2AKrHUs6QKZFSZZI+nvJPw6FxhulEyKDEd9wQ3jyRwmfq C9Zr1Y55otdDkQKJeIxJWH/gp5PF0jZIX99VLNUnG5sbNOJnIWb6EqD81QUKEI3CqcGu /I1CryXFwcOlDQAT3rwRUesqXcVB6dn1Dj4hFufgHM5n8OlmCl3p84NlpPlwgwrVR+/6 8DCmR5QIhmDIKMOxOT15iLcNWV3UXtqBeUlJkfZd5dqdf7SjuVEnn4PpnSAyhBnt+sd3 uHNc7B4l7j2PX62yz24QQeYJTI8f9gMAKiHCfcf7pGejiaNVDjMRuTKjIJXoEcrmX71b rlXQ== X-Gm-Message-State: APt69E3hsk8rJLA1JPA3cGjDUv/PbndBhVB9/eueOavGcn/LmCckskxz vK19mF847CyGKJ7CTNkX3gf35Q== X-Received: by 2002:a17:902:6903:: with SMTP id j3-v6mr5848785plk.313.1529033465927; Thu, 14 Jun 2018 20:31:05 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::91a0]) by smtp.gmail.com with ESMTPSA id i7-v6sm23257253pfa.34.2018.06.14.20.31.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jun 2018 20:31:05 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Thu, 14 Jun 2018 20:31:06 -0700 Message-Id: <20180615033106.32342-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180615033106.32342-1-raj.khem@gmail.com> References: <20180615033106.32342-1-raj.khem@gmail.com> Subject: [oe] [meta-oe][PATCH V2 2/2] modemmanager: Fix build with musl provide canonicalize_file_name() X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- Changed in V2: - Add Upstream-Status ...eck-for-canonicalize_file_name-befor.patch | 66 +++++++++++++++++++ .../modemmanager/modemmanager_1.7.991.bb | 4 +- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Add-configure-check-for-canonicalize_file_name-befor.patch -- 2.17.1 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel Acked-by: Andreas Müller diff --git a/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Add-configure-check-for-canonicalize_file_name-befor.patch b/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Add-configure-check-for-canonicalize_file_name-befor.patch new file mode 100644 index 0000000000..f3cf3d639b --- /dev/null +++ b/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Add-configure-check-for-canonicalize_file_name-befor.patch @@ -0,0 +1,66 @@ +From 07f1eda630517816bfa900e811963745a149e57c Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 8 Jun 2018 20:38:30 -0700 +Subject: [PATCH] Add configure check for canonicalize_file_name() before use + +Define canonicalize_file_name API if not provided by system C library +musl e.g. does not provide this API + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + configure.ac | 2 ++ + src/kerneldevice/mm-kernel-device-generic.c | 18 ++++++++++++++++++ + 2 files changed, 20 insertions(+) + +Index: ModemManager-1.7.991/configure.ac +=================================================================== +--- ModemManager-1.7.991.orig/configure.ac ++++ ModemManager-1.7.991/configure.ac +@@ -72,6 +72,8 @@ AC_SUBST(MM_GLIB_LT_CURRENT) + AC_SUBST(MM_GLIB_LT_REVISION) + AC_SUBST(MM_GLIB_LT_AGE) + ++AC_CHECK_FUNCS([canonicalize_file_name]) ++ + dnl----------------------------------------------------------------------------- + dnl Documentation + dnl +Index: ModemManager-1.7.991/src/kerneldevice/mm-kernel-device-generic.c +=================================================================== +--- ModemManager-1.7.991.orig/src/kerneldevice/mm-kernel-device-generic.c ++++ ModemManager-1.7.991/src/kerneldevice/mm-kernel-device-generic.c +@@ -21,6 +21,7 @@ + #define _LIBMM_INSIDE_MM + #include + ++#include "config.h" + #include "mm-kernel-device-generic.h" + #include "mm-kernel-device-generic-rules.h" + #include "mm-log.h" +@@ -100,6 +101,24 @@ read_sysfs_property_as_string (const gch + return contents; + } + ++#ifndef HAVE_CANONICALIZE_FILE_NAME ++#include ++#include ++#include ++#include ++static char * canonicalize_file_name(const char *path) ++{ ++ char buf[PATH_MAX] = { }; ++ ++ snprintf(buf, sizeof(buf) - 1, "%s", path); ++ ++ if (!realpath(path, buf)) ++ return NULL; ++ ++ return strdup(buf); ++} ++#endif ++ + /*****************************************************************************/ + /* Load contents */ + diff --git a/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.7.991.bb b/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.7.991.bb index b1a718dbfb..26b56d17d0 100644 --- a/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.7.991.bb +++ b/meta-oe/recipes-connectivity/modemmanager/modemmanager_1.7.991.bb @@ -11,7 +11,9 @@ inherit gnomebase gettext systemd vala gobject-introspection bash-completion DEPENDS = "glib-2.0 libgudev dbus-glib intltool-native" -SRC_URI = "http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz" +SRC_URI = "http://www.freedesktop.org/software/ModemManager/ModemManager-${PV}.tar.xz \ + file://0001-Add-configure-check-for-canonicalize_file_name-befor.patch \ + " SRC_URI[md5sum] = "4efe6a240cef212bf8855c95424e7c7f" SRC_URI[sha256sum] = "4e366243bd4983f2e6efe35cb901cf5da51939307b5d6299fe622a9fcf411745"