Hi David,
Thanks for your effort on the new version of Torsocks.
I've had a brief look at getting a working build on OSX (10.8.4), however I've run into a few problems, which I'm attempting to work through, but I'm not entirely sure how to fix all of them, I'll see how far I get.
The syscalls are handled a little differently on Darwin, which I've partially fixed.
For reference I'm getting similar errors reported by grarpamp in socks5.c, torsocks.h.
Also in tsocks_recvmsg a call to getsockopt uses SO_DOMAIN, which as far as I can tell is Linux only. This appeared to be a problem in an earlier version of Torsocks in tsocks_sendto_guts, although I'm not sure if this work around is still usefull in this context:
https://github.com/dgoulet/torsocks/commit/1e4e20b1bbed7d2e3b8b4d60420a746a0...
regards,
Luke