From: Richard Russon Date: Thu, 9 Nov 2017 12:35:02 +0000 (+0000) Subject: build: restore externs X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d98d7e1f2ef9b45467bcf670ff84162447b9429;p=neomutt build: restore externs The MacOS build failed, with linker errors for libconn's global variables. By initialising them, we hope to force the linker to use them. --- diff --git a/conn/conn_globals.c b/conn/conn_globals.c index 2f8ef5115..22de6a3d9 100644 --- a/conn/conn_globals.c +++ b/conn/conn_globals.c @@ -39,21 +39,22 @@ */ #include "config.h" +#include -short ConnectTimeout; /**< Config: $connect_timeout */ +short ConnectTimeout = 0; /**< Config: $connect_timeout */ #ifdef USE_SSL -const char *CertificateFile; /**< Config: $certificate_file */ -const char *EntropyFile; /**< Config: $entropy_file */ -const char *SslCiphers; /**< Config: $ssl_ciphers */ -const char *SslClientCert; /**< Config: $ssl_client_cert */ +const char *CertificateFile = NULL; /**< Config: $certificate_file */ +const char *EntropyFile = NULL; /**< Config: $entropy_file */ +const char *SslCiphers = NULL; /**< Config: $ssl_ciphers */ +const char *SslClientCert = NULL; /**< Config: $ssl_client_cert */ #ifdef USE_SSL_GNUTLS -const char *SslCaCertificatesFile; /**< Config: $ssl_ca_certificates_file */ -short SslMinDhPrimeBits; /**< Config: $ssl_min_dh_prime_bits */ +const char *SslCaCertificatesFile = NULL; /**< Config: $ssl_ca_certificates_file */ +short SslMinDhPrimeBits = 0; /**< Config: $ssl_min_dh_prime_bits */ #endif #endif #ifdef USE_SOCKET -const char *Preconnect; /**< Config: $preconnect */ -const char *Tunnel; /**< Config: $tunnel */ -#endif /* USE_SOCKET */ +const char *Preconnect = NULL; /**< Config: $preconnect */ +const char *Tunnel = NULL; /**< Config: $tunnel */ +#endif diff --git a/conn/conn_globals.h b/conn/conn_globals.h index 1b52c0b05..5b8d4e163 100644 --- a/conn/conn_globals.h +++ b/conn/conn_globals.h @@ -26,19 +26,19 @@ short ConnectTimeout; #ifdef USE_SSL -const char *CertificateFile; -const char *EntropyFile; -const char *SslCiphers; -const char *SslClientCert; +extern const char *CertificateFile; +extern const char *EntropyFile; +extern const char *SslCiphers; +extern const char *SslClientCert; #ifdef USE_SSL_GNUTLS -const char *SslCaCertificatesFile; +extern const char *SslCaCertificatesFile; short SslMinDhPrimeBits; #endif #endif #ifdef USE_SOCKET -const char *Preconnect; -const char *Tunnel; +extern const char *Preconnect; +extern const char *Tunnel; #endif #endif /* _CONN_GLOBALS_H */