Unknown type name '__priority_which_t'

I just updated Fedora 18 with gcc 4.7.2. Code that was previously compiled now with __priority_which_t error error

unknown type name '__priority_which_t' int setpriority(__priority_which_t which, id_t who, int prio) __attribute__((weak)); 

I guess, since it is _t, and starts with two underscores - this is something provided by the c library or the compiler. Does anyone know where he could go or what should now be used in his place?

+4
source share
1 answer

Due to some cleanup in the header files by the gcc commands and types that were previously accidentally included, no longer exists. In this case, the title, which was previously implicitly included <sys/resource.h> , stopped doing this in 4.7.2, violating compilation.

Direct inclusion

 #include <sys/resource.h> 

gets the definition of __priority_which_t and allows compilation to complete.

+4
source

All Articles