compiling ssmtp on Debian 5 (gcc 4.3.2) usin the wolfSSL headers gererates the following errors:
ssmtp-2.64# make
gcc -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DHAVE_SSL=1 -DSSMTPCONFDIR=\"usr/etc/ssmtp\" -DCONFIGURATION_FILE=\"usr/etc/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"usr/etc/ssmtp/revaliases\" -g -O2 -Wall -c -o ssmtp.o ssmtp.c
In file included from ssmtp.c:29:
/usr/include/cyassl/openssl/crypto.h:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'
/usr/include/cyassl/openssl/crypto.h:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned'
make: *** [ssmtp.o] Error 1
Using the openssl headers, it compiles fine, but of course cant link to wolfSSL as follows:
gcc -o ssmtp ssmtp.o arpadate.o base64.o xgethostname.o -lnsl -lcyassl -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DHAVE_SSL=1 -DSSMTPCONFDIR=\"usr/etc/ssmtp\" -DCONFIGURATION_FILE=\"usr/etc/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"usr/etc/ssmtp/revaliases\" -g -O2 -Wall
ssmtp.o: In function `fd_getc':
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1291: undefined reference to `SSL_read'
ssmtp.o: In function `smtp_open':
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1127: undefined reference to `SSL_load_error_strings'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1128: undefined reference to `SSL_library_init'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1129: undefined reference to `SSLv23_client_method'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1130: undefined reference to `SSL_CTX_new'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1137: undefined reference to `SSL_CTX_use_certificate_chain_file'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1142: undefined reference to `SSL_CTX_use_PrivateKey_file'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1147: undefined reference to `SSL_CTX_check_private_key'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1253: undefined reference to `SSL_new'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1258: undefined reference to `SSL_set_fd'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1260: undefined reference to `SSL_connect'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1267: undefined reference to `SSL_get_current_cipher'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1267: undefined reference to `SSL_CIPHER_get_name'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1271: undefined reference to `SSL_get_peer_certificate'
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1275: undefined reference to `X509_free'
ssmtp.o: In function `fd_puts':
/opt/SRC/misc/ssmtp-2.64/ssmtp.c:1358: undefined reference to `SSL_write'
collect2: ld returned 1 exit status
make: *** [ssmtp] Error 1
Is there a fix for the headers or a workaround to wrap the function names when linking?
Thanks much!