I believe that the android NDK defines ANDROID so it should be fairly easy to make a patch. TCP/IP networking should work however I haven't tested it. The only thing that I had to comment out that would make much of a difference was in open_pseudo_terminal_slave due to
I_PUSH
not being defined.