Fix fb.h breaking compilation of userspace programs
PATCH 1/1 Fix fb.h breaking compilation of userspace programs
Hi,
The latest changes introduced to the fb structs in linux/fb.h make compilation of userspace programs break with:
include/linux/fb.h:305: error: field `modelist' has incomplete type
This is caused by struct list_head not being seen from userspace. The attached patch is a possible fix for this problem.
Live long and prosper.
Signature · 3 lines
Michal 'Spock' Januszewski Gentoo Linux Developer cell: +48504917690 http://dev.gentoo.org/~spock/ JID: [email protected] freenode: #gentoo-dev, #gentoo-pl
include/linux/list.h +4 -6
@@ -1,6 +1,10 @@#ifndef _LINUX_LIST_H#define _LINUX_LIST_H +struct list_head { +struct list_head *next, *prev; +}; +#ifdef __KERNEL__#include <linux/stddef.h>
@@ -25,10 +29,6 @@* using the generic single-entry routines. */ -struct list_head { -struct list_head *next, *prev; -}; -#define LIST_HEAD_INIT (name) { &(name), &(name) }#define LIST_HEAD (name) \
@@ -696,7 +696,5 @@ ({ tpos =hlist_entry (pos,typeof (*tpos), member);1 ;}); \ pos = rcu_dereference(pos->next)) -#else -#warning "don't include kernel headers in userspace"#endif /* __KERNEL__ */ #endif
Quoted 9 lines · Michal Januszewski
Hi,
The latest changes introduced to the fb structs in
linux/fb.hmake compilation of userspace programs break with:
include/linux/fb.h:305: error: field `modelist' has incomplete typeThis is caused by struct
list_headnot being seen from userspace. The attached patch is a possible fix for this problem.
Thanks. Instead of making struct list_head visible to userspace, I'll just move modelist out of struct fb_monspecs.
Tony
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click