[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

RE: Tor 0.2.1.6-alpha is out




Of course i'm willing to test this if you send me a modified src/common/compat.c
(i tried to insert your draft myself but i was not successful).

Thanks.

Best Regards


> Date: Sat, 18 Oct 2008 15:23:17 -0700
> From: coderman@xxxxxxxxx
> To: or-talk@xxxxxxxxxxxxx
> Subject: Re: Tor 0.2.1.6-alpha is out
>
> On Sat, Oct 18, 2008 at 6:15 AM, otto otto <o815@xxxxxxxxxxx> wrote:
> > I get the following error when trying to build tor-0.2.1.6-alpha on Sun
> > Solaris 10x86.
> > ...
> > compat.c: In function `tor_lockfile_lock':
> > compat.c:509: warning: implicit declaration of function `flock'
>
> it looks like the way to fix this is add a configure check for "flock"
> and fall back on fcntl when not present. for example:
>
> src/common/compat.c: line 508
> #ifdef HAVE_FCNTL_H
> struct flock fl;
> fl.l_type = F_WRLCK;
> fl.l_whence = SEEK_SET;
> fl.l_start = 0;
> fl.l_len = 0;
> fl.l_pid = getpid();
> if (fcntl(fd, F_SETLK, &fl) < 0) {
> #else
> if (flock(fd, LOCK_EX|(blocking ? 0 : LOCK_NB)) < 0) {
> #endif
>
> unlock is similar, except you set fl.l_type = F_UNLCK;
>
> this is a bit of a patch, and unfortunately not many Tor developers /
> supporters use Solaris. it would be nice to have a fix for this,
> perhaps if you would be willing to test some patches i could take a
> stab at initial support for the fcntl changes.
>
> best regards,


Zeigen Sie es Ihren Freunden! Erstellen Sie kostenlos Fotoalben und Diashows in Ihrem Space!