When using fbsplash in suspend2-sources-2.6.19 make fails due to fbsplash including config.h instead of autoconf.h. After patching drivers/video/vesafb-thread.c drivers/video/cfbsplash.c drivers/video/fbsplash.c to include autoconf.h Compilation fails with the following error: CC drivers/video/vesafb-thread.o drivers/video/vesafb-thread.c: In function 'ioperm': drivers/video/vesafb-thread.c:43: error: 'errno' undeclared (first use in this function) drivers/video/vesafb-thread.c:43: error: (Each undeclared identifier is reported only once drivers/video/vesafb-thread.c:43: error: for each function it appears in.) drivers/video/vesafb-thread.c: In function 'vm86old': drivers/video/vesafb-thread.c:44: error: 'errno' undeclared (first use in this function) drivers/video/vesafb-thread.c: In function 'vesafb_thread': drivers/video/vesafb-thread.c:660: warning: implicit declaration of function 'try_to_freeze' make[2]: *** [drivers/video/vesafb-thread.o] Error 1 make[1]: *** [drivers/video] Error 2 make: *** [drivers] Error 2
Created attachment 103731 [details] my kernel config kernel config for suspend2-sources-2.6.19 with fbsplash
*** Bug 157764 has been marked as a duplicate of this bug. ***
linux/config.h is obsolete in 2.6.19 this should do the trick... #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18) #include <linux/config.h> #else #include <linux/autoconf.h> #endif you'll need to edit drivers/video/fbsplash.c drivers/video/cfbsplash.c drivers/video/vesafb-thread.c
(In reply to comment #3) > linux/config.h is obsolete in 2.6.19 > > this should do the trick... > > #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18) > #include <linux/config.h> > #else > #include <linux/autoconf.h> > #endif > > you'll need to edit > > drivers/video/fbsplash.c > drivers/video/cfbsplash.c > drivers/video/vesafb-thread.c > I changed as you suggested and got this: CC drivers/video/fbsplash.o drivers/video/fbsplash.c:20:5: warning: "LINUX_VERSION_CODE" is not defined drivers/video/fbsplash.c:20:27: warning: "KERNEL_VERSION" is not defined drivers/video/fbsplash.c:20:41: missing binary operator before token "(" make[2]: *** [drivers/video/fbsplash.o] Error 1 make[1]: *** [drivers/video] Error 2 make: *** [drivers] Error 2
(In reply to comment #3) > linux/config.h is obsolete in 2.6.19 > > this should do the trick... > > #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18) > #include <linux/config.h> > #else > #include <linux/autoconf.h> > #endif > > you'll need to edit > > drivers/video/fbsplash.c > drivers/video/cfbsplash.c > drivers/video/vesafb-thread.c > I changed config.h to autoconf.h in the 3 files and it compiles well. Thanks.
(In reply to comment #3) > linux/config.h is obsolete in 2.6.19 > As mentioned in my initial report I did replace config.h with autoconf.h, however the kernel still fails to compile.
I changed #include <linux/config.h> to #include <linux/autoconf.h> in all the three files and now I get: CC drivers/video/vesafb-thread.o drivers/video/vesafb-thread.c: In function `ioperm': drivers/video/vesafb-thread.c:43: error: `errno' undeclared (first use in this function) drivers/video/vesafb-thread.c:43: error: (Each undeclared identifier is reported only once drivers/video/vesafb-thread.c:43: error: for each function it appears in.) drivers/video/vesafb-thread.c: In function `vm86old': drivers/video/vesafb-thread.c:44: error: `errno' undeclared (first use in this function) drivers/video/vesafb-thread.c: In function `vesafb_thread': drivers/video/vesafb-thread.c:660: warning: implicit declaration of function `try_to_freeze' make[2]: *** [drivers/video/vesafb-thread.o] Error 1 make[1]: *** [drivers/video] Error 2 make: *** [drivers] Error 2
Miroslav, I also was getting your error. There are two things I did to fix the problem: 1. Copy the ebuild to your local overlay and change the version of the patchset in the ebuild: --- /home/cs/.emacs_backups/!usr!local!portage!sys-kernel!suspend2-sources!suspend2-sources-2.6.19.ebuild.~1~ 2006-12-11 23:27:50.000000000 +0100 +++ /usr/local/portage/sys-kernel/suspend2-sources/suspend2-sources-2.6.19.ebuild 2006-12-11 23:28:07.000000000 +0100 @@ -4,7 +4,7 @@ ETYPE="sources" K_WANT_GENPATCHES="base extras" -K_GENPATCHES_VER="1" +K_GENPATCHES_VER="2" inherit eutils kernel-2 detect_version 2. Edit drivers/video/vesafb-thread.c to include linux/freezer.h : --- /usr/src/linux/drivers/video/vesafb-thread.c~ 2006-12-11 23:30:31.000000000 +0100 +++ /usr/src/linux/drivers/video/vesafb-thread.c 2006-12-11 23:39:07.000000000 +0100 @@ -12,6 +12,7 @@ #include <linux/module.h> #include <linux/kernel.h> #include <linux/errno.h> +#include <linux/freezer.h> #include <linux/mm.h> #include <linux/delay.h> #include <linux/signal.h> Best regards Christian
Christian, thank you, that helped :-)
*** Bug 157919 has been marked as a duplicate of this bug. ***
*** Bug 158132 has been marked as a duplicate of this bug. ***
Thanks! Fixed in suspend2-sources-2.6.19-r1.