devctl.h does not compile from C++
The closing boilerplate of the C++ extern C wrapper is out of order with another #endif and the resulting code does not compile.
The attached patch addresses this but it needs to be merged to newlib and the RSB updated before this ticket closed.
Patch to newlib is on #4193.