pthread_mutex_t lockhost = PTHREAD_MUTEX_INITIALIZER;
void lookup_address(DUMMY_ARG *darg)
{
struct hostent *from = 0;
struct hostent ent;
char buf[16384]; // enough ??
int err;
thread_count++;
#ifdef __CYGWIN__
pthread_mutex_lock(lockhost);
from = gethostbyaddr(darg->buf, sizeof(darg->buf), AF_INET );
#else
gethostbyaddr_r( darg->buf, sizeof(darg->buf), AF_INET, &ent, buf, 16384, &from, &err);
#endif
if (from && from->h_name)
{
free_string(darg->d->host);
darg->d->host = str_dup(from->h_name);
}
#ifdef __CYGWIN__
pthread_mutex_unlock(lockhost);
#endif
/*
* Brilliant system there Mr. Jobo
*/
darg->d->lookup_status++;
free_string(darg->buf);
darg->status = 0;
thread_count–;
pthread_exit(0);
}
comm.c:57:48: error: execinfo.h: No such file or directory
make: *** [o/comm.o] Error 1
How can I fix this?
I used the Full Install of CygWin.