Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 5b8577ae authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Don't use time_t in scfg_t definition

sbbsctrl.exe is built with Borland C++ still which only has a 32-bit time_t, so to keep the scfg_t definition compatible between MSVC and Borland builds, use time32_t (32-bit time_t) values only.

This fixes the reported sbbsctrl.exe error:
Error loading configuration
cfg->size (23944) != sizeof(scfg_t) (23952)

Introduced in commit e535aaac.
Reported via DOVE-Net by  Daryl Stout (TBOLT), confirmed by Nightfox (DIGDIST).
parent 3c55d333
Pipeline #2473 passed with stage
in 16 minutes and 36 seconds
......@@ -620,7 +620,7 @@ typedef struct
// Run-time state information (not configuration)
int tls_certificate;
time_t tls_cert_file_date;
time32_t tls_cert_file_date;
} scfg_t;
......
......@@ -291,7 +291,7 @@ CRYPT_CONTEXT get_ssl_cert(scfg_t *cfg, char **estr, int *level)
return -1;
pthread_mutex_lock(&ssl_cert_mutex);
SAFEPRINTF2(str,"%s%s",cfg->ctrl_dir,"ssl.cert");
time_t fd = fdate(str);
time32_t fd = (time32_t)fdate(str);
if (cfg->tls_certificate != -1 || !cfg->prepped) {
if (fd == cfg->tls_cert_file_date) {
pthread_mutex_unlock(&ssl_cert_mutex);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment