use portable stat instead of bsd specific DT_SOCK
use POSIX 2001
Merge branch 'master' of github:schachmat/p2p_otr