Ssl error while trying to compile Libreoffice online

I built the Libreoffice’s core successfully. But i have a problem while compiling web socket server. Here’s what i did;

libtoolize
aclocal
automake --add-missing
autoreconf
autoheader

 ./configure --enable-silent-rules --with-lokit-path=${MASTER}/include --with-lo-path=${MASTER}/instdir --enable-debug --with-poco-includes=/opt/poco/include --with-poco-libs=/opt/poco/lib

then;

make

Here’s the error:

net/Ssl.cpp: In constructor ‘SslContext::SslContext(const string&, const string&, const string&)’:
net/Ssl.cpp:46:5: error: ‘void OPENSSL_config(const char*)’ is deprecated [-Werror=deprecated-declarations]
     OPENSSL_config(nullptr);
     ^~~~~~~~~~~~~~
In file included from /usr/include/openssl/ct.h:13:0,
                 from /usr/include/openssl/ssl.h:61,
                 from net/Ssl.hpp:19,
                 from net/Ssl.cpp:13:
/usr/include/openssl/conf.h:92:1: note: declared here
 DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name))
 ^
net/Ssl.cpp:46:27: error: ‘void OPENSSL_config(const char*)’ is deprecated [-Werror=deprecated-declarations]
     OPENSSL_config(nullptr);
                           ^
In file included from /usr/include/openssl/ct.h:13:0,
                 from /usr/include/openssl/ssl.h:61,
                 from net/Ssl.hpp:19,
                 from net/Ssl.cpp:13:
/usr/include/openssl/conf.h:92:1: note: declared here
 DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name))
 ^
net/Ssl.cpp: In member function ‘void SslContext::initDH()’:
net/Ssl.cpp:237:7: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
     dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0);
       ^~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from /usr/include/openssl/comp.h:16,
                 from /usr/include/openssl/ssl.h:47,
                 from net/Ssl.hpp:19,
                 from net/Ssl.cpp:13:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
net/Ssl.cpp:238:7: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
     dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0);
       ^~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from /usr/include/openssl/comp.h:16,
                 from /usr/include/openssl/ssl.h:47,
                 from net/Ssl.hpp:19,
                 from net/Ssl.cpp:13:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
net/Ssl.cpp:239:7: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
     dh->length = 160;
       ^~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from /usr/include/openssl/comp.h:16,
                 from /usr/include/openssl/ssl.h:47,
                 from net/Ssl.hpp:19,
                 from net/Ssl.cpp:13:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
net/Ssl.cpp:240:13: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
     if ((!dh->p) || (!dh->g))
             ^~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from /usr/include/openssl/comp.h:16,
                 from /usr/include/openssl/ssl.h:47,
                 from net/Ssl.hpp:19,
                 from net/Ssl.cpp:13:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
net/Ssl.cpp:240:25: error: invalid use of incomplete type ‘DH {aka struct dh_st}’
     if ((!dh->p) || (!dh->g))
                         ^~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from /usr/include/openssl/comp.h:16,
                 from /usr/include/openssl/ssl.h:47,
                 from net/Ssl.hpp:19,
                 from net/Ssl.cpp:13:
/usr/include/openssl/ossl_typ.h:104:16: note: forward declaration of ‘DH {aka struct dh_st}’
 typedef struct dh_st DH;
                ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [net/Ssl.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Libreoffice/online team has provided a patch for this problem:
https://cgit.freedesktop.org/libreoffice/online/commit/?id=702bbdd5d8dd31eda8a2dfdb726be3c6cd978ec2
(also see original bug report: https://bugs.documentfoundation.org/show_bug.cgi?id=111429 )

after patching /opt/online/net/Ssl.ccp, the compiling finishes without error.