media-libs/svgalib-1.9.25 fails to compile against sys-kernel/gentoo-sources-2.6.28 with the following error: /var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/main.c: In function ‘init_module’: /var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/main.c:660: error: implicit declaration of function ‘device_create_drvdata’ CC [M] /var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/virtual.o make[2]: *** [/var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [_module_/var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.28-gentoo' make: *** [default] Error 2 The proposed patch is trivial and involves some more #define hacks about the device_create() function. I simply copied and pasted the macro definition already in place for the 2.6.27 kernel, but I believe I spotted a missing argument (namely, void * drvdata). GCC warned me about the inconsistency and i added a NULL argument: the module compiles fine. I'll test the new kernel + svgalib in minutes.
Created attachment 176440 [details, diff] Patch to kernel26compat.h to allow compilation of svgalib-1.9.25 on 2.6.28
Created attachment 177228 [details] ebuild that applies the patch provided above. This applies the patch provided, and it builds here locally.
patch looks good
worked well for me, thanks a lot.
how to i apply the patch?
(In reply to comment #1) > Created an attachment (id=176440) [edit] > Patch to kernel26compat.h to allow compilation of svgalib-1.9.25 on 2.6.28 > Hello, when is this patch going to make it into an available package?
I had this problem with gentoo-sources 2.6.28-r1 and the attached patch helped me. Thanks.
I will fix the ebuild soon.
Fix committed to tree. No revbump as it fixes a build breakage. Renamed no-kernel USE flag to kernel-helper and make it default.