redsocks icon indicating copy to clipboard operation
redsocks copied to clipboard

failed to cross-compile for Android

Open iwinux opened this issue 13 years ago • 4 comments

redudp.c has been using tfind / tsearch functions (defined in <search.h>) since commit 709646d59d96cb73a7e70347f37de9823e4e5f14, which causes the failure of cross-compiling for Android, because the Android standalone toolchain doesn't provide <search.h>, neither does it implements tfind related functions.

A quick fix can be done by downloading the missing files from here, put them into the redsocks repo, and update Makefile to add these dependencies. (tested on my machine and it works)

What do you think?

iwinux avatar Nov 10 '12 20:11 iwinux

Hey, where did you find the definitions for node_t? I tried to copy the files as you say but I cannot find definitions of node_t.

Periphory avatar Jul 29 '14 16:07 Periphory

@Periphory well, since this was a nearly two-year old issue, things may change drastically :(

iwinux avatar Jul 30 '14 01:07 iwinux

Hmm, I cannot find a more up-to-date straight build for Android. None of the files that are in the place you linked have been updated since before then so there must be a definition somewhere.

Periphory avatar Jul 30 '14 08:07 Periphory

I've added following paragraph to README:

When is redsocks probably a wrong tool?

Tell me, is Android build still relevant for your project? Probably, tun2socks (or alike code) would suit better as it has same capabilities and does not require root.

darkk avatar Feb 01 '18 21:02 darkk