Netcat 0.7.1 does not compile on Cygwin.
The networking swiss army knife
Status: Beta
Brought to you by:
themnemonic
Netcat 0.7.1 does not compile on Cygwin out of the box.
1) On Windows, there is no ipi_spec_dst in struct in_pktinfo.
Also, when issue (1) is fixed, UDP mode does not work, as:
2) SO_LINGER option is not valid for UDP sockes on Windows
I've included a patch which modifies configure.ac, config.h.in and netcat.h to take (1) into account, and also modifies netcat.c in order to address (2).
Procedure:
download netcat-0.7.1.tar.gz
tar -xvf netcat-0.7.1.tar.gz
patch -p0 < netcat-cygwin.patch
cd netcat-0.7.1
aclocal
autoconf
autoheader
./configure
make
Patch to fix compilation and UDP SO_LINGER setsockopt() errors.
Note that this patch will break things on platforms where ipi_spec_dst is available. The reason is a missing #include in AC_CHECK_MEMBERS:
https://github.com/veithen/netcat/commit/7d75beb9db88f2254382530cbc21e8ad703da35e