lkml.org 
[lkml]   [2011]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [GIT PULL] UBI changes for 2.6.40
    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
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-06-12 08:43    [W:0.022 / U:87.612 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site