
When compiling LLVM with -std=c++ instead of -std=gnu we'd fail to detect many newer POSIX functions. We define it for the whole of LLVM anyway so moving the definition to the top fixes detection of a bunch of these on such setups. Keeping it at the top also avoids accidentally introducing new dependent checks before it being defined.
See docs/CMake.html for instructions on how to build LLVM with CMake.