This is the compiler message (somewhat stripped):
/usr/include/sys/mman.h:145: error: 'mode_t' has not been declared
Another error:
In file included from /usr/include/sys/resource.h:25,
from /usr/include/sys/wait.h:32,
/usr/include/bits/resource.h:172: error: field 'ru_utime' has incomplete type
/usr/include/bits/resource.h:174: error: field 'ru_stime' has incomplete type
And another one:
In file included from /usr/include/sys/wait.h:32,
/usr/include/sys/resource.h:94: error: 'id_t' has not been declared
/usr/include/sys/resource.h:98: error: 'id_t' has not been declared
This is on Linux, GCC 4.3.1. Do you have any clues why these happen?
It turned out to be issue with system header include inside a namespace. After that GCC became crazy. If anyone encounters similar problem, don't be surprised when the solution is totally unrelated to error messages. And be very careful when finding the cause.