Various fixes to compile with GCC 4.7

this fixes kernel compile and should merge easily +2 for dhacker