[openib-general] Re: RFC: kill CFLAGS in makefiles?

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Wed Mar 22 13:01:48 PST 2006


On Wed, Mar 22, 2006 at 02:24:07PM +0200, Michael S. Tsirkin wrote:
> Nothing. But that's not what we had for mutex backport.
 
> We had
> 
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
> #include <linux/mutex-backport.h>
> #else
> #include <linux/mutex.h>
> #endif /* XXX end of hack */

If you keep the -I you can do this:

Source:
#include <linux/mutex.h>

And in drivers/infiniband/.../include/linux/mutex.h:
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,16)
#include_next <linux/mutex.h> // goes to linux/include/mutex.h
#else
....
#endif

The benifit being that the ugly hackery in the source files can go
away.

Jason



More information about the general mailing list