When pion is used with asio SSL then corresponding include (namely boost/asio/ssl.hpp) is done too early before PION_HAVE_SSL is defined (the later comes from pion/config.hpp). It looks like code in #ifdef PION_HAVE_SSL should go after #include <pion/config.hpp>.