Torsocks patch for iDevices
Marco Bonetti
sid77 at slackware.it
Wed Jul 7 09:56:42 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
- --
Marco Bonetti
Tor research and other stuff: http://sid77.slackware.it/
Slackintosh Linux Project Developer: http://workaround.ch/
Linux-live for powerpc: http://workaround.ch/pub/rsync/mb/linux-live/
My GnuPG key id: 0x0B60BC5F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkw0T1kACgkQTYvJ9gtgvF9ViwCgw7IQZSyPoiR7WdQGjvvJp6xR
UU8An0tGOtGwhWibfva0bCQDrJy4Uf9h
=CCwZ
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tsocks.iphone.diff
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20100707/6ed8f8f0/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tsocks.iphone.diff.sig
Type: application/octet-stream
Size: 72 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20100707/6ed8f8f0/attachment.obj>
More information about the tor-dev
mailing list