Does anyone know why that __need_res_state nonsense is in there at all? It is only used by linuxthreads/descr.h, which is not a public header file. So it can just include <resolv.h> without any special funny business. I am inclined to rip out the __need_res_state magic to simplify the header.