linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix fb.h breaking compilation of userspace programs
@ 2004-09-04 16:35 Michal Januszewski
  2004-09-04 21:42 ` Antonino A. Daplas
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Januszewski @ 2004-09-04 16:35 UTC (permalink / raw)
  To: linux-fbdev-devel


[-- Attachment #1.1: Type: text/plain, Size: 573 bytes --]

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.
-- 
Michal 'Spock' Januszewski                        Gentoo Linux Developer
cell: +48504917690                         http://dev.gentoo.org/~spock/
JID: spock@im.gentoo.org               freenode: #gentoo-dev, #gentoo-pl


[-- Attachment #1.2: fb-list.patch --]
[-- Type: text/plain, Size: 877 bytes --]

diff -Naur linux-2.6.9-rc1/include/linux/list.h linux-2.6.9-rc1-a/include/linux/list.h
--- linux-2.6.9-rc1/include/linux/list.h	2004-09-04 18:18:18.000000000 +0200
+++ linux-2.6.9-rc1-a/include/linux/list.h	2004-09-04 18:23:55.401859688 +0200
@@ -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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix fb.h breaking compilation of userspace programs
  2004-09-04 16:35 [PATCH] Fix fb.h breaking compilation of userspace programs Michal Januszewski
@ 2004-09-04 21:42 ` Antonino A. Daplas
  0 siblings, 0 replies; 2+ messages in thread
From: Antonino A. Daplas @ 2004-09-04 21:42 UTC (permalink / raw)
  To: linux-fbdev-devel, Michal Januszewski

On Sunday 05 September 2004 00:35, Michal Januszewski wrote:
> 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.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-09-04 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-04 16:35 [PATCH] Fix fb.h breaking compilation of userspace programs Michal Januszewski
2004-09-04 21:42 ` Antonino A. Daplas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).