With next line:
``` sed -i -e 's/0x10100000L/0x10100000L || defined(LIBRESSL_VERSION_NUMBER)/' src/modules/tls/tls_locking.c ```
it appears that you change the sources of kamailio and also compile with libressl. The tls module is developed for openssl/libssl. Use this library and if troubles, then open an issue.