在编译时这种错误,不知道大家遇到过没有,怎么解决呢?
read_handle_server.c: In function ‘mqtt3_handle_connect’:
read_handle_server.c:351:4: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
context->username = _mosquitto_strdup((char *)ASN1_STRING_data(name_entry->value));
^~~~~~~
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/include/openssl/x509.h:23,
from /usr/include/openssl/ssl.h:50,
from ../lib/mosquitto_internal.h:27,
from ./mosquitto_broker.h:23,
from read_handle_server.c:22:
/usr/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
read_handle_server.c:351:77: error: dereferencing pointer to incomplete type ‘X509_NAME_ENTRY {aka struct X509_name_entry_st}’
context->username = _mosquitto_strdup((char *)ASN1_STRING_data(name_entry->value));
^~
Makefile:54: recipe for target 'read_handle_server.o' failed
make[1]: *** [read_handle_server.o] Error 1
make[1]: Leaving directory '/home/liushiyi/tools/mosquitto-1.4.5/src'
Makefile:21: recipe for target 'mosquitto' failed
make: *** [mosquitto] Error 2
read_handle_server.c: In function ‘mqtt3_handle_connect’:
read_handle_server.c:351:4: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
context->username = _mosquitto_strdup((char *)ASN1_STRING_data(name_entry->value));
^~~~~~~
In file included from /usr/include/openssl/bn.h:31:0,
from /usr/include/openssl/asn1.h:24,
from /usr/include/openssl/objects.h:916,
from /usr/include/openssl/evp.h:27,
from /usr/include/openssl/x509.h:23,
from /usr/include/openssl/ssl.h:50,
from ../lib/mosquitto_internal.h:27,
from ./mosquitto_broker.h:23,
from read_handle_server.c:22:
/usr/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
read_handle_server.c:351:77: error: dereferencing pointer to incomplete type ‘X509_NAME_ENTRY {aka struct X509_name_entry_st}’
context->username = _mosquitto_strdup((char *)ASN1_STRING_data(name_entry->value));
^~
Makefile:54: recipe for target 'read_handle_server.o' failed
make[1]: *** [read_handle_server.o] Error 1
make[1]: Leaving directory '/home/liushiyi/tools/mosquitto-1.4.5/src'
Makefile:21: recipe for target 'mosquitto' failed
make: *** [mosquitto] Error 2