In ssl/kssl.c the constant _XOPEN_SOURCE is defined which results in  
using an old POSIX version and compilation problems on recent FreeBSD  
systems when adding SCTP support (necessary for SCTP-aware DTLS).

With _XOPEN_SOURCE defined to 500, in sys/cdefs.h the constant  
_POSIX_C_SOURCE will get the value 199506 instead of 200112. The  
constant __POSIX_VISIBLE then gets the same value, so an old POSIX  
version will be assumed. This is not only needless, it also is a  
problem when including netinet/sctp.h to use SCTP. In this header file  
the structure sin6 is needed, which is defined in netinet/in6.h that  
gets included by netinet/in.h, but only when #if __POSIX_VISIBLE >=  
200112 is true.

Hence, defining _XOPEN_SOURCE to 500 makes it impossible to use SCTP,  
even if the constant is undefined afterwards. A solution is to assign  
at least 600, then the following constants will be set correctly. This  
should make no difference for its original purpose, because glibc2  
seems to only need _XOPEN_SOURCE defined somehow.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to