On Tue, Jan 20, 2009 at 01:16:30PM -0800, Luis R. Rodriguez wrote: > As Michael pointed out -- its tough, in fact I am not sure how to do this with > static inlines. Advice on how to do this is welcomed. I have no clue. > In this case, where a header will be providing a static inline, and you need to provide a stub function, and you're unable to test on a typedef, you'll have to use a weak function. kyle@phobos ~ $ cat foo.c #include "bar.h" #include "compat.h" int main(void) { int a = 0; a = foo(a); return a; } kyle@phobos ~ $ cat compat.h int __attribute__((weak)) foo(int x); kyle@phobos ~ $ cat bar.h static inline int foo(int a) { return a; } kyle@phobos ~ $ cat compat.c int __attribute__((weak)) foo(int a) { return a+1; } kyle@phobos ~ $ gcc -Wall -O2 -o foo foo.c compat.c kyle@phobos ~ $ ./foo kyle@phobos ~ $ echo $? 0 Seems to work ok and not whinge about the double definition. > > > BTW are you saying the above practice of adding new stuff to headers > > > is OK too? I wish it wasn't... > > > > Sure it's ok, distros can do whatever they want in their kernels, are > > you telling them that they are now not allowed to do that? :) > > Heh they can do what they want, but I think it can create issues and I personally > frown upon it. So I will at least bitch about it and maybe I'll create a bug report > to see if it gets washed away. > *sigh* I don't know, and don't really want to argue about it. ;-) People with backports are pretty much always going to get screwed. What's the use case for wireless-testing backports? bugfixes or new features? Could we improve the stable process to help wireless stuff get into 2.6.$(x-1) more easily so this won't happen in the future? regards, Kyle -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html