I am using poll()
function in my program, I read this link that to use POLLRDHUP
flag you have to define _GNU_SOURCE
before all header file inclusion. I needed this flag so that polling the socket can tell me whether the client has hung up or not, so that I can terminate the corresponding thread.
By the way I am writing a C program for an 'echo' server which can handle multiple clients concurrently, and I am using GCC 4.1.2 on OpenSuse Linux Enterprise Server 10.3 (x86_64).