From patchwork Tue Jul 23 08:55:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 1135494 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.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="n/mJOWF1"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45tC4M6TQLz9s3l for ; Tue, 23 Jul 2019 18:55:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 20C2686FBB; Tue, 23 Jul 2019 08:55: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 0bcebioMPUA6; Tue, 23 Jul 2019 08:55:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id DCECF85C62; Tue, 23 Jul 2019 08:55:41 +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 BD7C11BF2A1 for ; Tue, 23 Jul 2019 08:55:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BACF620410 for ; Tue, 23 Jul 2019 08:55:26 +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 XMCOUG4AXK3T for ; Tue, 23 Jul 2019 08:55:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by silver.osuosl.org (Postfix) with ESMTPS id 53AB220002 for ; Tue, 23 Jul 2019 08:55:25 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id r15so11774156lfm.11 for ; Tue, 23 Jul 2019 01:55:25 -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; bh=zVky5byth1gOnRN90GVP8V5v451+V5KxwO6HMDFUYSY=; b=n/mJOWF1tVgHvhktDliAQVNvcM1ecrqhbFyMhJR5Dy6RBg4TJ9Wb0DIjHGkf7k0CLU 26+VHTsA1ZzmusDty8fkqShWlNn8CkYoJ3WyigfmEZVXgrK3C08OxbBdkRky3vtdL0Cj xmsMrR8PSMORW9fG/fsxTtKGFCgfJQbuS62cloEG2Z+DOuEy64u2c7VDoskyQbTsAcyZ V1Ff8PCJQwjoKQSG2BVMdg/Hjp+qz5rO2k7lst3WOGLBd3u3fltX9jigfg9KxPnieZCi SFHWnwlXC6YaL+s4jycJoeyGQKDZO+wnRMQBXYuYfl9fNKYPL3RhX4etH/SPw0bYCuI5 8nqA== 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=zVky5byth1gOnRN90GVP8V5v451+V5KxwO6HMDFUYSY=; b=q33yEF7uAiTo6uG8WRyW7bR/YOOQI87lmIo2QmSXqZ49Ne9WxWGB3LEyaxSCPWxSLB 20PMjlCBVzE1QRZv7IXQkEyfGqqziPUT4FKzyQKXUr3gQCDFamGeU1AFqOceiZTiGTv/ kepsypGLoMWAr9VXacY4/Hs2tg+wUIylSPhUbX54Ua4+C5K/Y/lX9pc3b3YXPuHeR6Jy oA7yMqimWOTNcs9sfBP6fIfeCi6lJUnIyK1uoCBF4OhIS6VMKYhFvLxm/rSq8oor+FVL scrK6H+ZPaebVfqzkV8Pt34zyuUWvdp/cFLPbt1KiHyoGUEol10HmCngw/ywk4fWZmPw +pTA== X-Gm-Message-State: APjAAAVo82VhdEybfG1IlAqN8n/A1tiTjLPDzynDq/Pw3BxQNI1B46A9 wvOVKrzW80bt+ys9t4MPm00CR44YzVs= X-Google-Smtp-Source: APXvYqync8R/kf49T0WqtRo96PqSSY/iw+I4OVfo2UDCuQ2SJhzC9sMyanpX+JZkQ5F4bU21+PhE9A== X-Received: by 2002:ac2:5e82:: with SMTP id b2mr23663418lfq.3.1563872123212; Tue, 23 Jul 2019 01:55:23 -0700 (PDT) Received: from pc60716vkochan.x.ow.s (92-130-179-94.pool.ukrtel.net. [94.179.130.92]) by smtp.gmail.com with ESMTPSA id n124sm6381529lfd.46.2019.07.23.01.55.22 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 01:55:22 -0700 (PDT) From: Vadim Kochan To: buildroot@buildroot.org Date: Tue, 23 Jul 2019 11:55:16 +0300 Message-Id: <20190723085516.17377-1-vadim4j@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH 1/1] package/flashrom: fix redefinition of 'struct termios' X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vadim Kochan , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Both libc and linux defines 'struct termios', in termbits.h and termios.h which leads to the compilation error: In file included from custom_baud.c:23:0: /home/buildroot/autobuild/instance-3/output/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/asm-generic/termbits.h:12:8: error: redefinition of 'struct termios' struct termios { ^~~~~~~ In file included from /home/buildroot/autobuild/instance-3/output/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/termios.h:39:0, from /home/buildroot/autobuild/instance-3/output/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/bits/ioctl-types.h:5, from /home/buildroot/autobuild/instance-3/output/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/sys/ioctl.h:29, from custom_baud.c:21: /home/buildroot/autobuild/instance-3/output/host/powerpc-buildroot-linux-uclibc/sysroot/usr/include/bits/termios.h:33:8: note: originally defined here struct termios { ^~~~~~~ So fix it by renaming 'termios' to 'asmtermios' before termbits.h only, because 'struct termios2' is used only. Fixes: http://autobuild.buildroot.net/results/797dde5cbf0e94162c7cc7b557841605c78ac2f3/ Signed-off-by: Vadim Kochan --- ...d-fix-redefinition-of-struct-termios.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 package/flashrom/0002-custom_baud-fix-redefinition-of-struct-termios.patch diff --git a/package/flashrom/0002-custom_baud-fix-redefinition-of-struct-termios.patch b/package/flashrom/0002-custom_baud-fix-redefinition-of-struct-termios.patch new file mode 100644 index 0000000000..5c4a681303 --- /dev/null +++ b/package/flashrom/0002-custom_baud-fix-redefinition-of-struct-termios.patch @@ -0,0 +1,36 @@ +From e94fd14bba4fe21dcb791a44d700ad7f036b8c7e Mon Sep 17 00:00:00 2001 +From: Vadim Kochan +Date: Tue, 23 Jul 2019 11:37:17 +0300 +Subject: [PATCH] custom_baud: fix redefinition of 'struct termios' + +both libc and linux kernel defines 'struct termios', once it is defined +via termbits.h and second time it is re-defined via sys/ioctl.h. But +because only termios2 is used so hide 'struct termios' by renaming it as +'struct asmtermios'. + +Signed-off-by: Vadim Kochan +--- + custom_baud.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/custom_baud.c b/custom_baud.c +index caf2b78..22fb74f 100644 +--- a/custom_baud.c ++++ b/custom_baud.c +@@ -18,10 +18,12 @@ + #include "custom_baud.h" + + #if IS_LINUX +-#include + #include ++#define termios asmtermios + #include + #include ++#undef termios ++#include + + /* + * This include hell above is why this is in a separate source file. See eg. +-- +2.17.1 +