From patchwork Sat Jun 9 06:44:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 138073 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1723862lji; Fri, 8 Jun 2018 23:45:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLZF4vyL3ahhXASbBp3Zd5i7NzOK5R3Sd9YW6gfC9eVEuJ+2PfKLMyJUEiR/QxCLzSkT1gB X-Received: by 2002:a63:6d0:: with SMTP id 199-v6mr7694631pgg.338.1528526702174; Fri, 08 Jun 2018 23:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528526702; cv=none; d=google.com; s=arc-20160816; b=M6HLjxXZlx7/PaqigwGY1xRkSFzZx0N4WTmcJO44kNrXzlcgvN2GbTEHWpB1/lcXv8 5EDsQvBtduivVihe1yaCnPurqIjJOI8Mlx9zNHm5ZxrZgocjfJlXF2qDG21/3Wbd0qzr X7whY4PGYUFcx5ZrcFZoTMugcwJkQCXRq3FgkDmVFq/gJQYnAGroCWboPmEu/kQbW9Do qQchLByimRfbs7USNhIsWlN/MOJRQTBOdlVCw39CqVfE6mAvSJ3OjIXZD16W4B5AqRz5 OdmRuLGvBpeguUO9/Wjltdxdrib6yZRJdEOtfPPrMp6eQoE0OQOTQWvv/Cx/gSYsauF8 s5qg== 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=+ZYxWuTihEXcZc1pJM1FmMCTfn9F+Q372LuMhqtfRPo=; b=m0J5bwRBqbvZHZUSfTa94+cC22t1llHlkiVKuBUSMh5T0nU1/cM7weZVWsxaF7s1Zh 0dA9/sicwVj6iMq/8ZcfH3HKao90cixTqpqQVxJvRdxXiQqklfZ/rGCg/fNOnWIhg0eK 6Aa/qwZpT0ZgXuWaX24C8sy2m39yloCH6LLCc91pZigccdb7h8q+XBoq1905p2SFuwiD lDqzhEWEdg6TI0z5Hj/Iw//X4Gk/peIM0exNw92tmo6FpzvVAZr6HtACuq1PXFL4QA8G Feaqkl/Jg7kwE34Kgoaif2vf1L2zX5LOp0GDeCkJ/xgQ/Pu8pzn7XmkwlxlYYXFlu1Kw YWnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=dYGvwaiu; 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 1-v6si31811697plz.379.2018.06.08.23.45.01; Fri, 08 Jun 2018 23:45:02 -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=dYGvwaiu; 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 9BD067535B; Sat, 9 Jun 2018 06:44:46 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pl0-f41.google.com (mail-pl0-f41.google.com [209.85.160.41]) by mail.openembedded.org (Postfix) with ESMTP id EEC9B751D5 for ; Sat, 9 Jun 2018 06:44:18 +0000 (UTC) Received: by mail-pl0-f41.google.com with SMTP id 31-v6so9460742plc.4 for ; Fri, 08 Jun 2018 23:44:20 -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=vctWxk8kgg4Z741hj6UPdgX7WoG5Ar4Nnbx4gJnMGfE=; b=dYGvwaiuNcjKDhy5TQY0dBHfjS/xgdECkETjA2Tg4+s3OkTH6lln+5jBok+wQRw3dC 2H9qWGyD+evTXm2LLf3+q7pci5CFB3SJbbOmVzfLlOgSHLnlbPrNeTEwSKFzhZMKQia/ cOD3QytMmM4TsKHRJcJDABh5t55Pe+rtHxkVCRyCpXdZ2LT5NnteY16X4VygQTBbes8l a4IBNfgwRp1UraZ7Zkiy9RS0iLrxypRheW4dUVu8CnIEQcwN0EtJD4r3kOq6+exP5OWc dQdlGCeG4TW2Z7MZLl1JRKl/xyYPZpeFuSxfRblSsr4VM/kwFXDpDRMcbxbVO9P7N0Pk DZTQ== 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=vctWxk8kgg4Z741hj6UPdgX7WoG5Ar4Nnbx4gJnMGfE=; b=jqW+TWxGWxDXkQl0YGAuDPWx+GzCgeWcEziMwokyvDtvuqfpiFgGn34iwcBuB/qOyW HlLdue6m6hgHHFQ7Ivt1Ki4uaoUhHFX9TwVIsq9PDt4FCw9eiW44kPDAizR9e7TDNFNf TUEBubZL8VikBwwghtLxZZc3Y3ksPqh5RAXrmx4E1RDGjCvJIL65BZX49W9Wpz8YIRDd XupkzsTKYPNFVr3Rs//S4m49C3U1yKR9AWCT2P00iHhip7Jiu7Ieqif4CLIDFYdFJax+ FM2MX/k9jje8qI66QL3oNZMNEodlcpwSZn5fMXWR5xLWIGu+GQTmYD6DVCsDGMnLeuWR C8nA== X-Gm-Message-State: APt69E2estY36Cswb2+hpVkiCXAUPrSJKqrpaZ60Z0Vm/o5n+QBV/aae S2ph3q6iGBrB/gEBLvakdBPUww== X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr9724126plt.288.1528526659700; Fri, 08 Jun 2018 23:44:19 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::c68]) by smtp.gmail.com with ESMTPSA id c67-v6sm26926352pfj.173.2018.06.08.23.44.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jun 2018 23:44:19 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Fri, 8 Jun 2018 23:44:14 -0700 Message-Id: <20180609064415.10270-5-raj.khem@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180609064415.10270-1-raj.khem@gmail.com> References: <20180609064415.10270-1-raj.khem@gmail.com> Subject: [oe] [meta-oe][PATCH 5/6] 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 --- ...eck-for-canonicalize_file_name-befor.patch | 56 +++++++++++++++++++ .../modemmanager/modemmanager_1.7.991.bb | 4 +- 2 files changed, 59 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 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..d474edbda6 --- /dev/null +++ b/meta-oe/recipes-connectivity/modemmanager/modemmanager/0001-Add-configure-check-for-canonicalize_file_name-befor.patch @@ -0,0 +1,56 @@ +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 +--- + configure.ac | 2 ++ + src/kerneldevice/mm-kernel-device-generic.c | 18 ++++++++++++++++++ + 2 files changed, 20 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 9bf26ed..6d7abdb 100644 +--- a/configure.ac ++++ b/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 +diff --git a/src/kerneldevice/mm-kernel-device-generic.c b/src/kerneldevice/mm-kernel-device-generic.c +index 6b0f072..a108b7d 100644 +--- a/src/kerneldevice/mm-kernel-device-generic.c ++++ b/src/kerneldevice/mm-kernel-device-generic.c +@@ -100,6 +100,24 @@ read_sysfs_property_as_string (const gchar *path, + 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"