Archive for May, 2008

Compiling connect.c on Solaris 10

Wednesday, May 7th, 2008

I mentioned connect.c for SOCKS proxy connections. Compiling it on Solaris 10 is relatively straightforward but you need to define INADDR_NONE as it’s not present in the system headers.

gcc -DINADDR_NONE='((unsigned long)-1)' connect.c -o connect \
-lnsl -lsocket -lresolv

You also need to link it with libnsl, libsocket and libresolv.