From patchwork Wed Feb 6 00:45:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 157551 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp5813635jaa; Tue, 5 Feb 2019 16:47:04 -0800 (PST) X-Google-Smtp-Source: AHgI3IY+xYfQl4GtTsG8Df47F79eJ4q87KUt5AUnNQZNUSaMkHlqzi8/3DspRZhDZWKCNrh2MtiN X-Received: by 2002:a62:870e:: with SMTP id i14mr7916209pfe.41.1549414024708; Tue, 05 Feb 2019 16:47:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549414024; cv=none; d=google.com; s=arc-20160816; b=TCieIIOQl1haOlXode1wFf/OcL1Vp+iX/WV/01wMsZzt6lmxlM//ip9pN7ZNU9iYdd 08AdbKuoDbnqrosiKZBGtOPRJOvig7vd1wwOxkl32Ghq8MVm/MK3kKwHZQtRFBf0wWYt H/dQkclaZIO8dV6VpXxYVEoBbL+00oDxlbnHbwHYNB6726zaixLbktYFxrH3hQ9JnIZd mbmpFQJ7JgbKmC4P4nZntiqxP3raHkMaPPImh4LEiSu5Qpl42avlqUH7S4JZGC/bmNVz MAAaZW9R51zq4LzZXbk9lTjRe26LMDGyvd05vTGR6Z5Y4Fqq9ZKEC54qJ2SCoG3Az0AB 4DVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=v0bjwrjrNSYXHFOLQkyRlSJheHFFNpT03/EYCnfMUVM=; b=gaHWGI7y9CiyUwL1CWVbQKicZ3378QdqTCM9SYDuYX9TOcg27AyMQhqG6FeZnHif21 NGe9BsLkeRDzz+24/nJ/26NpxiW6JC2QH14ojVs7u4cH+GgGbU5ZWIY5zbETYp2wc6qc 7qztfm2Eqit5+zuWjdGG8KRJ7lGHDd6sdY3A8tUfnEk0KF0hMGBH8R6InbV7ghOIbMSD bIsAHYeQZz9NKVqIE/SmyM4nVWWFPP1/SWg+D1cjYDWCZ4psxDCImoL6C6t7nBM2M8LZ H89E5wrvEv4RyicGFojR207R9FBi3EGL/YpwRbqQvdcYiCUXL1gD87AYKzuT+Vc1528t Mwyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=h7WM4lGU; 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 61si1076336plz.117.2019.02.05.16.47.04; Tue, 05 Feb 2019 16:47:04 -0800 (PST) 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=h7WM4lGU; 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 ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id AA4997C39D; Wed, 6 Feb 2019 00:46:37 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mail.openembedded.org (Postfix) with ESMTP id E2BDB7C035 for ; Wed, 6 Feb 2019 00:46:00 +0000 (UTC) Received: by mail-pf1-f172.google.com with SMTP id 64so2303711pfr.9 for ; Tue, 05 Feb 2019 16:46:02 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=GPW8SVPmE8QW2l61lYf4BL+76AdHOQTi09ylzACUcJ4=; b=h7WM4lGUAElCQPCQYHDJ32hRyZ3IpwdEyk8hWmPlZw54irMcmknoW/lJfQfeBzb9zv lnrlCI8vKoLE3jKFQklS3tAZJjzcwnJuYbXhA+qRV48julYwsN+fliW02X80LaViPgXU ws/WhDQ7EBOnbP/xCedEUisAtuzqmgwnvwxB3fzeZ5Yby3Wqs3k9yQ6kpz0MUjydgxlk KdmBLy/52NY/RCpAfNBHzY9mm6sKVV1vZm47WstvmSE4EvFa4b8+R7xR3tUmyJef8wMp RSuJ3e/fWpdfRKBdu4N6ubTNQmab3EBSZn09BHu0h0XCkjIAS23PFrq1/E+bUkebD0Wt BVCA== 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:mime-version:content-transfer-encoding; bh=GPW8SVPmE8QW2l61lYf4BL+76AdHOQTi09ylzACUcJ4=; b=uYcWJiJp7HxTg85Q0V4heT2TxH2GZ3u6mehsUJKlBc3UaAXeyxwU7mCNRPJPvjt8UA 2kSAAyEMQnps1wMMozKiRQkh6XgUCtLR1tigvIUOQQnH1NHI16GQIuKNvmg1ZHZJfJ5Y SeHcIxhOK94Z4z+Q50s4NTN6u1zge9C13JolSl4xyQneJezP0HJDeibKkJ7WaAubOPAx CG9WvnJOAdcy3/VGro0lJxCKa+WrpRzbRMEoTWj4gA6MadaAGyg7GzIJBpQtGPol8rGe 4nQZhaFyRc6J82njtsrKbSp8nq0FdMUYPytE06kMa1NK6GVr5RE5eU7OZytL/4QvoGhm KrlA== X-Gm-Message-State: AHQUAubq5DkKTQEYSSW+HRLkK+erwWTKsYexISdezLUoPwx7P7sQYR/r hdlOhpU2fvZkBUrhYMb8R2niuJPl X-Received: by 2002:a62:6503:: with SMTP id z3mr7581244pfb.169.1549413961610; Tue, 05 Feb 2019 16:46:01 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:6bc6::a005]) by smtp.gmail.com with ESMTPSA id l74sm7684098pfb.145.2019.02.05.16.46.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 16:46:00 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 5 Feb 2019 16:45:47 -0800 Message-Id: <20190206004547.32351-6-raj.khem@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190206004547.32351-1-raj.khem@gmail.com> References: <20190206004547.32351-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [oe] [meta-oe][PATCH V2 6/6] ltrace: Fix build with clang 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: , Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- v2: Fix build regression with gcc ...hook-Do-not-append-int-to-std-string.patch | 33 +++++++++++++++++++ meta-oe/recipes-devtools/ltrace/ltrace_git.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch -- 2.20.1 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch new file mode 100644 index 0000000000..8f1c4b9b9b --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-hook-Do-not-append-int-to-std-string.patch @@ -0,0 +1,33 @@ +From 8321f8b3befbaa355cfed988fdd8494133989676 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 4 Feb 2019 00:38:16 -0800 +Subject: [PATCH] hook: Do not append int to std::string + +Clang find this error + +| ../../../git/sysdeps/linux-gnu/hooks.c:205:51: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus +-int] +| || sprintf(syspath, "%s/%s", sysconfdir, FN + 1) < 0) +| ~~~^~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + sysdeps/linux-gnu/hooks.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sysdeps/linux-gnu/hooks.c ++++ b/sysdeps/linux-gnu/hooks.c +@@ -200,9 +200,10 @@ os_get_ltrace_conf_filenames(struct vect + const char *sysconfdir = SYSCONFDIR; + if (sysconfdir != NULL && *sysconfdir != '\0') { + /* No +1, we skip the initial period. */ +- syspath = malloc(strlen(sysconfdir) + sizeof FN); ++ syspath = malloc(strlen(sysconfdir) + sizeof FN + 1); ++ syspath[strlen(sysconfdir) + sizeof FN + 1] = '\0'; + if (syspath == NULL +- || sprintf(syspath, "%s/%s", sysconfdir, FN + 1) < 0) ++ || sprintf(syspath, "%s/%s", sysconfdir, FN) < 0) + goto fail; + } + diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index 83043cd212..3dc269c80e 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb @@ -26,6 +26,7 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \ file://0001-mips-plt.c-Delete-include-error.h.patch \ file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ + file://0001-hook-Do-not-append-int-to-std-string.patch \ " S = "${WORKDIR}/git"