From nobody Thu Apr 25 04:07:40 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1553382279101532.327347566725; Sat, 23 Mar 2019 16:04:39 -0700 (PDT) Received: from [192.168.203.99] (mailu_mailman-core_1.mailu_default [192.168.203.99]) by coreboot.org (Postfix) with ESMTP id 3BDC0A418C5; Sat, 23 Mar 2019 23:04:34 +0000 (UTC) Received: from SMTP03.CITRIX.COM (smtp03.citrix.com [162.221.156.55]) by coreboot.org (Postfix) with ESMTP id 3E1ABA4086B for ; Thu, 21 Mar 2019 15:48:23 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,253,1549929600"; d="scan'208";a="81257848" From: Andrew Cooper To: SeaBIOS Date: Thu, 21 Mar 2019 15:47:36 +0000 Message-ID: <1553183256-19434-1-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-MailFrom: prvs=97628d904=Andrew.Cooper3@citrix.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: LPS3KSR4HMP2FKXJEVMDNYBTZCZMSW36 X-Message-ID-Hash: LPS3KSR4HMP2FKXJEVMDNYBTZCZMSW36 X-Mailman-Approved-At: Sat, 23 Mar 2019 23:04:28 +0000 CC: Andrew Cooper X-Mailman-Version: 3.2.0 Precedence: list Subject: [SeaBIOS] [PATCH] block: Fix compilation with CentOS 6 List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ++++ X-Spam-Level: **** Authentication-Results: coreboot.org Content-Type: text/plain; charset="utf-8" GCC 4.4 from CentOS 6 chokes in the following way: src/hw/blockcmd.c: In function 'scsi_rep_luns_scan': src/hw/blockcmd.c:229: error: unknown field 'cdbcmd' specified in initial= izer src/hw/blockcmd.c:229: warning: missing braces around initializer src/hw/blockcmd.c:229: warning: (near initialization for 'op.') src/hw/blockcmd.c:229: warning: initialization makes integer from pointer= without a cast Avoid using an initialiser list. Signed-off-by: Andrew Cooper --- Discovered while adding CentOS 6 to Xen's CI system. If this patch is acceptable, what are the chances of having it backported to 1.12-stable ? --- src/hw/blockcmd.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c index 1f15081..a40f37c 100644 --- a/src/hw/blockcmd.c +++ b/src/hw/blockcmd.c @@ -222,16 +222,17 @@ int scsi_rep_luns_scan(struct drive_s *tmp_drive, scs= i_add_lun add_lun) struct cdb_report_luns cdb =3D { .command =3D CDB_CMD_REPORT_LUNS, }; - struct disk_op_s op =3D { - .drive_fl =3D tmp_drive, - .command =3D CMD_SCSI, - .count =3D 1, - .cdbcmd =3D &cdb, - }; + /* GCC 4.4 (CentOS 6) can't initialise anonymous unions. */ + struct disk_op_s op =3D {}; struct cdbres_report_luns *resp; =20 ASSERT32FLAT(); =20 + op.drive_fl =3D tmp_drive; + op.command =3D CMD_SCSI; + op.count =3D 1; + op.cdbcmd =3D &cdb; + while (1) { op.blocksize =3D sizeof(struct cdbres_report_luns) + maxluns * sizeof(struct scsi_lun); --=20 2.1.4 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org