kwin-5.18.x clockskewnotifierengine_linux error: use of undeclared identifier 'errno' causes compile failure when using clang
I have a Gentoo system that's mostly compiled using clang, the clang runtime compiler-rt, llvm's libc++ and the llvm toolchain. I haven't tested this using gcc so I don't know if gcc catches the same error. kwin will fail the compile phase when trying to compile clockskewnotifierengine_linux.cpp which is new from the kwin-5.17 to kwin-5.18 branch. The issue is an undeclared identifier, errno. I'm attaching a patch which declares the identifier so kwin can compile using clang + the llvm toolchain. The error is as follows:
/work/kwin-5.18.5/colorcorrection/clockskewnotifierengine_linux.cpp:38:77: error: use of undeclared identifier 'errno' qWarning("Couldn't create clock skew notifier engine: %s", strerror(errno));
I can't seem to create a merge request and I've never submitted a patch before so if there is anything I need to do please let me know. Thank you very much.