On Thursday 24 November 2011 14:26:48 Andrew Lunn wrote:
I would be even happier when we also could remove the '#include "compat.h"' from main.h somehow, but I had no good (and working) idea.
Hi Sven
Could you build solution using the gcc option:
-include file
Process file as if #include "file" appeared as the first line of the primary source file.
Pass this when compiling out of tree by appending it to CFLAGS? The hard thing is the ordering. compat.h will be first, before all other header files.
No, this doesn't work. I had the same idea, but not only our stuff is build, but also some extra kernel stuff. These file will just fail (tested here on open-mesh.org with multiple kernel build versions).
Thanks, Sven