lkml.org 
[lkml]   [2007]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] compat_ioctl requires CONFIG_BLOCK
On Mon, Jul 23 2007, Andrew Morton wrote:
> On Sat, 21 Jul 2007 01:08:57 +0200
> Arnd Bergmann <arnd@arndb.de> wrote:
>
> > On Saturday 21 July 2007, Sebastian Siewior wrote:
> > >
> > > Got with randconfig
> > > include/linux/loop.h:66: error: expected specifier-qualifier-list before
> > > 'request_queue_t'
> > > make[1]: *** [fs/compat_ioctl.o] Error 1
> > >
> > > parts of compat ioctl require CONFIG_BLOCK to be set.
> > >
> > > Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
> > > Index: b/fs/compat_ioctl.c
> > > ===================================================================
> > > --- a/fs/compat_ioctl.c
> > > +++ b/fs/compat_ioctl.c
> > > @@ -63,7 +63,9 @@
> > > __#include <linux/wireless.h>
> > > __#include <linux/atalk.h>
> > > __#include <linux/blktrace_api.h>
> > > +#ifdef CONFIG_BLOCK
> > > __#include <linux/loop.h>
> > > +#endif
> >
> > Adding #ifdef around an #include is considered bad style. Better just
> > make loop.h compile without any conditionals. Does the below
> > patch work for you?
>
> This is the classic why-typedefs-are-bad. AFAIK there is no way of fixing
> this build error apart from adding otherwise-unneeded nested inclusions
> (very bad), or:
>
> > Arnd <><
> >
> > --- a/include/linux/loop.h
> > +++ b/include/linux/loop.h
> > @@ -63,7 +63,7 @@ struct loop_device {
> > struct task_struct *lo_thread;
> > wait_queue_head_t lo_event;
> >
> > - request_queue_t *lo_queue;
> > + struct request_queue *lo_queue;
> > struct gendisk *lo_disk;
> > struct list_head lo_list;
> > };
>
> Good start. Now can we do the rest of the kernel? ;)

Yep indeed, it's been my plan to kill that ugly typedef for some time...

--
Jens Axboe

-
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: 2007-07-24 08:53    [W:0.047 / U:1.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site