Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Chris Dearman <chris@mips.com>
To: Doug Kehn <rdkehn@yahoo.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Kernel compiler error : flexible array member not at end of struct
Date: Tue, 04 Nov 2003 10:40:10 +0000	[thread overview]
Message-ID: <3FA7820A.2010701@mips.com> (raw)
In-Reply-To: <20031104054130.12392.qmail@web12008.mail.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

Doug Kehn wrote:
> I am using gcc version 2.96-mips3264-000710 (from
> sdelinux-5.01-4eb.i386.rpm).  The kernel is,
> obviously, 2.4.21 (from linux-mips.org).  uclibc is
> version 0.9.21.
> 
> I have seen one or two other posting related to this
> same error.  However, I was unable to find any
> suggested resoltions.  Does anyone know of a solution
> to this compile error?

   There is an updated version of the compiler that handles zero-length 
arrays in structures correctly.  See 
ftp://ftp.mips.com/pub/tools/software/sde-for-linux/

   Alternatively you could apply the attached patch

	Chris

-- 
Chris Dearman          The Fruit Farm, Ely Road    voice +44 1223 706206
MIPS Technologies (UK) Chittering, Cambs, CB5 9PH  fax   +44 1223 706250

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 475 bytes --]

Index: md_p.h
===================================================================
RCS file: linux-2.4.18/include/linux/raid/md_p.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- md_p.h	4 Mar 2002 11:13:33 -0000	1.1
+++ md_p.h	8 Nov 2002 13:09:02 -0000	1.2
@@ -151,10 +151,12 @@
 	 */
 	mdp_disk_t disks[MD_SB_DISKS];
 
+#if MD_SB_RESERVED_WORDS
 	/*
 	 * Reserved
 	 */
 	__u32 reserved[MD_SB_RESERVED_WORDS];
+#endif
 
 	/*
 	 * Active descriptor

      reply	other threads:[~2003-11-04 10:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-04  5:41 Kernel compiler error : flexible array member not at end of struct Doug Kehn
2003-11-04 10:40 ` Chris Dearman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FA7820A.2010701@mips.com \
    --to=chris@mips.com \
    --cc=linux-mips@linux-mips.org \
    --cc=rdkehn@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox