[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: Torsocks patch for iDevices
Hi Marco,
I've pushed this to a new branch 'iphone' in the torsocks git repo so we
can work on it together.
If you keep your branch on a repo in git hub I should be able to pull from
it and keep it in line with any changes I make.
Haven't looked at the patch yet, but it certainly applied cleanly!
On Wednesday 07 July 2010 10:56:42 Marco Bonetti wrote:
> Hi all,
> my name is Marco, I'm currently keeping a working port of Tor for the
> (jailbroken) iPhone/iPod Touch/iPad platforms.
> Attached here there's a patch for torsocks to build it with the iPhone
> Open Toolchain. The patch is very dirty so I'm looking for suggestions
> to clean it before (I hope!) an eventual inclusion.
> Basically, the iPhone OS is a stripped down version of OS X. The first
> step needed, is to identify that we're running a cross or native build
> for such platform: I'm using
> __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ which is not very elegant
> but, at least, it's the only define I've found with an "IPHONE" string
> in it.
> This platform defines both __APPLE__ and __darwin__, unfortunately we
> can't use _NONSTD_SOURCE, so I skip the define as if we're running on
> 64bit. Last, the core libraries are much simpler: the UNIX2003,
> NOCANCEL and DARWIN_EXTSN variants do not exist, so I skipped involved
> code blocks. In doing this I used the "#if (defined(__APPLE__) ||
> defined(__darwin__)) &&
> !defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)" switch, if
> someone could refresh me operators precedence I could remove a couple of
> brackets :-P
>
> Ciao!
> Marco