From patchwork Tue Aug 28 13:31:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 962946 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=micronovasrl.com Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=micronovasrl.com header.i=@micronovasrl.com header.b="kI3VueGX"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4208mZ27F6z9s1c for ; Tue, 28 Aug 2018 23:31:41 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9889A85078; Tue, 28 Aug 2018 13:31:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id whWv769DAMrk; Tue, 28 Aug 2018 13:31:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id C3B258516E; Tue, 28 Aug 2018 13:31:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 78AD01C14DD for ; Tue, 28 Aug 2018 13:31:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 76895857F3 for ; Tue, 28 Aug 2018 13:31:37 +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 FaomLXZdUMyb for ; Tue, 28 Aug 2018 13:31:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.micronovasrl.com (mail.micronovasrl.com [212.103.203.10]) by hemlock.osuosl.org (Postfix) with ESMTP id B2152820C3 for ; Tue, 28 Aug 2018 13:31:36 +0000 (UTC) Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id BCDD3B00A84 for ; Tue, 28 Aug 2018 15:31:35 +0200 (CEST) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:to :from:from; s=dkim; t=1535463094; x=1536327095; bh=hWeyhanjXNCLh f3+dOV/XiVztRH/VfB2jrVk8VwNDP0=; b=kI3VueGXlbNL8pBjY3YXzL7sroMFF wSjNhijE8ShILZaqOO21wwxaEHnD7BnDjKO7GcvcDDDqQxsS1FzgiljLJ1xWxlUB RAVVaKqFM7R2XnzWzfQv6kxSMopmx4WcvklHANTHFXBjAeVC8prnOUj3sqYFtJrj mb335ujprrkDc4= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XuQpdyNt3XMZ for ; Tue, 28 Aug 2018 15:31:34 +0200 (CEST) Received: from ubuntu.localdomain (62-11-51-166.dialup.tiscali.it [62.11.51.166]) by mail.micronovasrl.com (Postfix) with ESMTPSA id 27180B006A2; Tue, 28 Aug 2018 15:31:34 +0200 (CEST) From: Giulio Benetti To: buildroot@buildroot.org Date: Tue, 28 Aug 2018 15:31:31 +0200 Message-Id: <20180828133131.32838-1-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH next v3] atop: fix minor() major() build failure X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Ricardo Martincoski , Giulio Benetti Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" On arm / cortex-a8 Arch/Subarch sys/types.h doesn't include sys/sysmacros.h which contains minor() and major() macros. Add patch to directly include into photosyst.c where minor() and major() macros are used. Patch has been taken from atop upstream pull request: https://github.com/Atoptool/atop/pull/35 Fixes http://autobuild.buildroot.net/results/3fc/3fc0f18ed94697c404e7ff3751781789170c4fe5// Signed-off-by: Giulio Benetti --- ...ysmacros.h-to-compile-with-newer-gcc.patch | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/atop/0001-Include-sysmacros.h-to-compile-with-newer-gcc.patch diff --git a/package/atop/0001-Include-sysmacros.h-to-compile-with-newer-gcc.patch b/package/atop/0001-Include-sysmacros.h-to-compile-with-newer-gcc.patch new file mode 100644 index 0000000000..a80be7b736 --- /dev/null +++ b/package/atop/0001-Include-sysmacros.h-to-compile-with-newer-gcc.patch @@ -0,0 +1,52 @@ +From 414127c03669b4eedc85778a7bff80cf601311d8 Mon Sep 17 00:00:00 2001 +From: SjonHortensius +Date: Fri, 24 Aug 2018 18:26:58 +0200 +Subject: [PATCH] Include sysmacros.h to compile with newer gcc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Older gcc throws a warning +``` +photosyst.c: In function 'lvmmapname': +photosyst.c:1465:13: warning: In the GNU C Library, "major" is defined + by . For historical compatibility, it is + currently defined by as well, but we plan to + remove this soon. To use "major", include + directly. If you did not intend to use a system-defined macro + "major", you should undefine it after including . + dmp->major = major(statbuf.st_rdev); +``` + +Newer gcc throws an error: + +``` +photosyst.c: In function ‘lvmmapname’: +photosyst.c:1482:19: error: called object ‘major’ is not a function or function pointer + dmp->major = major(statbuf.st_rdev); + ^~~~~ +photosyst.c:1437:25: note: declared here + lvmmapname(unsigned int major, unsigned int minor, + ~~~~~~~~~~~~~^~~~~ +``` + +Signed-off-by: Giulio Benetti +--- + photosyst.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/photosyst.c b/photosyst.c +index 19cbbe1..50841a1 100644 +--- a/photosyst.c ++++ b/photosyst.c +@@ -152,6 +152,7 @@ + static const char rcsid[] = "$Id: photosyst.c,v 1.38 2010/11/19 07:40:40 gerlof Exp $"; + + #include ++#include + #include + #include + #include +-- +2.17.1 +