[lkml]   [2005]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: 2.6.11-mm2
    With the BUG_ON() use in linux/list.h I get this:

    CC init/initramfs.o
    In file included from include/linux/wait.h:23,
    from include/linux/fs.h:205,
    from init/initramfs.c:2:
    include/linux/list.h: In function `list_del':
    include/linux/list.h:164: warning: implicit declaration of function `printk'
    In file included from include/linux/spinlock.h:13,
    from include/linux/wait.h:25,
    from include/linux/fs.h:205,
    from init/initramfs.c:2:
    include/linux/kernel.h: At top level:
    include/linux/kernel.h:116: error: conflicting types for 'printk'
    include/linux/kernel.h:116: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
    include/linux/list.h:164: error: previous implicit declaration of 'printk' was here
    make[1]: *** [init/initramfs.o] Error 1
    make: *** [init] Error 2

    It looks like this is a result of having asm/bug.h included and not
    having linux/kernel.h included before it, as adding that makes this go
    away. This seems like it will be a problem for platforms that use
    printk() in their BUG() definitions (in the HAVE_ARCH_BUG case) without
    dragging in this header from somewhere else.

    With this I can build on sh again. The other solution is to add the
    include to asm/bug.h directly, but it would be nice to avoid linux/
    includes from asm/ context in general..

    Thoughts? Or ideas for a more appropriate fix?

    --- linux-sh-2.6.11-mm2.orig/include/linux/list.h 2005-03-08 15:46:50.601565604 +0200
    +++ linux-sh-2.6.11-mm2/include/linux/list.h 2005-03-08 15:46:53.882114403 +0200
    @@ -5,6 +5,7 @@

    #include <linux/stddef.h>
    #include <linux/prefetch.h>
    +#include <linux/kernel.h>
    #include <asm/system.h>
    #include <asm/bug.h>
    [unhandled content-type:application/pgp-signature]
     \ /
      Last update: 2005-03-22 14:11    [W:0.020 / U:0.044 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site