--- gutils/gioftp.c.orig 2011-02-15 12:37:40.000000000 +0900 +++ gutils/gioftp.c.orig 2011-12-02 23:36:03.000000000 +0900 @@ -613,7 +613,9 @@ } else { ftp = gcalloc(1,sizeof(struct ftpconnectiondata)); gc->connectiondata = (struct gio_connectiondata *) ftp; +#ifdef HAVE_PTHREAD_H pthread_mutex_lock(&stdfuncs->hostacccess_mutex); +#endif for ( had=(struct ftphostaccessdata *) (addr->had); had!=NULL && (had->port!=port || had->protocol_index!=ftp_protocol_index); had=had->next ); @@ -623,7 +625,9 @@ had->protocol_index = ftp_protocol_index; had->tzoff = -9999; } +#ifdef HAVE_PTHREAD_H pthread_mutex_unlock(&stdfuncs->hostacccess_mutex); +#endif ftp->ctl = ctl = socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); setnopipe(ctl); locaddr = addr->addr;