Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 176581

Summary: media-tv/wis-go7007 does not compile with kernel 2.6.21
Product: Gentoo Linux Reporter: Greg Smolyn <smolyn>
Component: New packagesAssignee: Steve Dibb (RETIRED) <beandog>
Status: RESOLVED FIXED    
Severity: normal CC: alanh, media-tv, rane
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 176188    
Attachments: Patch to re-add missing typedefs from 2.6.21 kernel's sound api
Convert to struct usage

Description Greg Smolyn 2007-04-30 14:25:40 UTC
The media-tv/wis-go7007 package's sound system fails to compile with the include files of the 2.6.21 kernel.

It seems a number of former typedefs have been lost (snd_card_t and others have been lost).

I've got a patch that adds the typedefs back for the one file in wis-go7007 that needs it.
Comment 1 Greg Smolyn 2007-04-30 14:26:48 UTC
Created attachment 117736 [details, diff]
Patch to re-add missing typedefs from 2.6.21 kernel's sound api
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2007-05-04 00:01:09 UTC
Patch should work but it would be better to remove usage of snd_card_t and friends, and instead use "struct snd_card" etc.
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2007-05-17 23:43:17 UTC
dsd: The usage in this patch is actually correct. He is basically defining it as an anonymous structure which is fine. There is not going to be any penalty for it speed wise. Anonymous structures are actually very popular to abstract away the need to pull in additional headers and also leak out data that should be private.
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2007-06-09 20:42:12 UTC
(In reply to comment #3)
> He is basically defining it as an anonymous structure 

No he's not. Maybe you meant opaque type? An opaque declaration would not suffice either though -- the real header is needed, e.g. go7007_snd_init() dereferences a snd_card_t pointer.

The patch will work just fine, my comment was purely on coding style: don't use typedef, reference the struct explicitly. See /usr/src/linux/Documentation/CodingStyle chapter 5.
Comment 5 Daniel Drake (RETIRED) gentoo-dev 2007-06-16 14:44:14 UTC
I'll be asking arches to mark 2.6.21 stable within the next few days, would be great if this issue could be fixed before that time.
Comment 6 Alan Hourihane 2007-07-16 18:57:57 UTC
Created attachment 125062 [details, diff]
Convert to struct usage

Patch to change to struct's rather that use typedeff'ing for the 2.6.21 kernels.
Comment 7 Steve Dibb (RETIRED) gentoo-dev 2007-07-17 01:11:18 UTC
(In reply to comment #6)
> Created an attachment (id=125062) [edit]
> Convert to struct usage
> 
> Patch to change to struct's rather that use typedeff'ing for the 2.6.21
> kernels.
> 

Thanks for the patch!

In CVS as -r2
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2007-07-17 02:19:31 UTC
Thanks, patch is exactly what I was suggesting.