public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus Trippelsdorf <markus@trippelsdorf.de>
To: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] UBI changes for 2.6.40
Date: Sun, 12 Jun 2011 08:40:02 +0200	[thread overview]
Message-ID: <20110612064002.GA1712@x4.trippels.de> (raw)
In-Reply-To: <20110524064147.4545.43792.sendpatchset@localhost.localdomain>

On 2011.05.24 at 09:41 +0300, Artem Bityutskiy wrote:
> 
>       UBI: use __packed instead of __attribute__((packed))

This patch causes a compile error when I build busybox:

  CC      miscutils/ubi_attach_detach.o
In file included from miscutils/ubi_attach_detach.c:27:0:
/usr/include/mtd/ubi-user.h:330:3: error: conflicting types for ‘__packed’
/usr/include/mtd/ubi-user.h:314:3: note: previous declaration of ‘__packed’ was here
/usr/include/mtd/ubi-user.h:372:3: error: conflicting types for ‘__packed’
/usr/include/mtd/ubi-user.h:314:3: note: previous declaration of ‘__packed’ was here
/usr/include/mtd/ubi-user.h:387:3: error: conflicting types for ‘__packed’
/usr/include/mtd/ubi-user.h:314:3: note: previous declaration of ‘__packed’ was here
/usr/include/mtd/ubi-user.h:399:3: error: conflicting types for ‘__packed’
/usr/include/mtd/ubi-user.h:314:3: note: previous declaration of ‘__packed’ was here
/usr/include/mtd/ubi-user.h:413:4: error: conflicting types for ‘__packed’
/usr/include/mtd/ubi-user.h:314:3: note: previous declaration of ‘__packed’ was here
make[1]: *** [miscutils/ubi_attach_detach.o] Error 1
make: *** [miscutils] Error 2
make: *** Waiting for unfinished jobs....

Either reverting or using something like this fixes the problem:

diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h
index 3c41097..47a6c21 100644
--- a/include/mtd/ubi-user.h
+++ b/include/mtd/ubi-user.h
@@ -23,6 +23,10 @@
 
 #include <linux/types.h>
 
+#ifndef __packed
+#define __packed __attribute__((packed))
+#endif
+
 /*
  * UBI device creation (the same as MTD device attachment)
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-- 
Markus

  reply	other threads:[~2011-06-12  6:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24  6:41 [GIT PULL] UBI changes for 2.6.40 Artem Bityutskiy
2011-06-12  6:40 ` Markus Trippelsdorf [this message]
2011-06-22  4:31   ` Artem Bityutskiy

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=20110612064002.GA1712@x4.trippels.de \
    --to=markus@trippelsdorf.de \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    /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