TCP mode fails on BSD (and OpenSolaris)

Looks like the same issue:
https://github.com/traviscross/mtr/issues/28
https://bugs.launchpad.net/mtr/+bug/1273486
https://bugs.launchpad.net/mtr/+bug/1327036

 % uname -srm; mtr -r --tcp localhost
 FreeBSD 10.0-RELEASE-p4 amd64
 Start: Fri Jun  6 22:20:00 2014
 bind(): Invalid argument
 %

 % uname -srm; mtr -r --tcp localhost
 NetBSD 6.1.3_PATCH i386
 Start: Fri Jun  6 22:23:13 2014
 bind(): Invalid argument
 %

 % uname -a; % mtr -r --tcp localhost
 SunOS opensolaris 5.11 oi_151a9 i86pc i386 i86pc
 Start: Wed Jun 11 19:49:28 2014
 bind(): Invalid argument
 %

OpenSolaris/OI: compile fails with FIONBIO

Looks like the same issue:
https://github.com/traviscross/mtr/issues/27
https://github.com/traviscross/mtr/issues/35
https://bugs.launchpad.net/mtr/+bug/1273486

 % make
 make  all-recursive
 Making all in img
 depbase=`echo net.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
 gcc -DHAVE_CONFIG_H  -I.       -g -O2 -Wall -MT net.o -MD -MP -MF $depbase.Tpo -c -o net.o net.c &&\
 mv -f $depbase.Tpo $depbase.Po
 net.c: In function `net_send_tcp':
 net.c:360: error: `FIONBIO' undeclared (first use in this function)
 net.c:360: error: (Each undeclared identifier is reported only once
 net.c:360: error: for each function it appears in.)
 *** Error code 1

fix: #define BSD_COMP