When trying to compile as much as I can in Gentoo with CLang, I realized that Bluez is not compiling due to a function definition inside a function, which is not allowed by clang. I am not sure if this may be the best solution, but I've made a patch that makes it compile without errors (not sure if it runs good yet though). I hope it is useful for reviewing and applying if you consider necesary, Thanks, David C. Manuelda