More compile fixes

the first patch is actually required to make it compile, the second is optional. For some reason I don't understand clang worked after removing the attribute but failed when recompiling the whole module. Anyway I've now checked that it works for a "cold" recompile...