build: fix GTK/OpenSSL warnings + tab color OOB

This commit is contained in:
2026-03-10 23:05:56 -06:00
parent 0aa6c26490
commit c0e5ef79ec
7 changed files with 24 additions and 14 deletions

View File

@@ -34,7 +34,6 @@ config_h.set_quoted('PACKAGE_NAME', meson.project_name())
config_h.set_quoted('GETTEXT_PACKAGE', 'zoitechat') config_h.set_quoted('GETTEXT_PACKAGE', 'zoitechat')
config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'),
get_option('datadir'), 'locale')) get_option('datadir'), 'locale'))
config_h.set_quoted('G_LOG_DOMAIN', 'zoitechat')
config_h.set10('ENABLE_NLS', true) config_h.set10('ENABLE_NLS', true)
# Optional features # Optional features

View File

@@ -16,6 +16,7 @@ fishlim_sources = [
shared_module('fishlim', fishlim_sources, shared_module('fishlim', fishlim_sources,
dependencies: [libgio_dep, zoitechat_plugin_dep, libssl_dep], dependencies: [libgio_dep, zoitechat_plugin_dep, libssl_dep],
c_args: ['-DOPENSSL_API_COMPAT=0x10100000L'],
install: true, install: true,
install_dir: plugindir, install_dir: plugindir,
name_prefix: '', name_prefix: '',

View File

@@ -19,10 +19,6 @@ if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system =
'shared/df.c' 'shared/df.c'
] ]
if get_option('gtk-frontend')
sysinfo_cargs += '-DUSE_GTK_FRONTEND'
endif
if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system == 'freebsd' if system == 'linux' or system == 'gnu' or system.startswith('gnu/') or system == 'freebsd'
libpci = dependency('libpci', required: false, method: 'pkg-config') libpci = dependency('libpci', required: false, method: 'pkg-config')
if libpci.found() if libpci.found()

View File

@@ -55,6 +55,7 @@ remove_tree (const char *path)
g_rmdir (path); g_rmdir (path);
} }
#ifdef G_OS_WIN32
static gboolean static gboolean
path_tree_has_entries (const char *path) path_tree_has_entries (const char *path)
{ {
@@ -86,6 +87,7 @@ path_tree_has_entries (const char *path)
g_dir_close (dir); g_dir_close (dir);
return FALSE; return FALSE;
} }
#endif
static gboolean static gboolean
gtk3_css_dir_parse_minor (const char *name, gint *minor) gtk3_css_dir_parse_minor (const char *name, gint *minor)

View File

@@ -694,17 +694,29 @@ conn_fail:
} else } else
{ {
SSL_SESSION *session = SSL_get_session (serv->ssl); SSL_SESSION *session = SSL_get_session (serv->ssl);
if (session && SSL_SESSION_get_time (session) + SSLTMOUT < time (NULL)) if (session)
{ {
g_snprintf (buf, sizeof (buf), "SSL handshake timed out"); time_t session_time = 0;
EMIT_SIGNAL (XP_TE_CONNFAIL, serv->server_session, buf, NULL, gboolean handshake_timed_out = FALSE;
#if OPENSSL_VERSION_NUMBER >= 0x30400000L
session_time = (time_t) SSL_SESSION_get_time_ex (session);
#else
session_time = SSL_SESSION_get_time (session);
#endif
handshake_timed_out = session_time + SSLTMOUT < time (NULL);
if (handshake_timed_out)
{
g_snprintf (buf, sizeof (buf), "SSL handshake timed out");
EMIT_SIGNAL (XP_TE_CONNFAIL, serv->server_session, buf, NULL,
NULL, NULL, 0); NULL, NULL, 0);
server_cleanup (serv); /* ->connecting = FALSE */ server_cleanup (serv); /* ->connecting = FALSE */
if (prefs.hex_net_auto_reconnectonfail) if (prefs.hex_net_auto_reconnectonfail)
auto_reconnect (serv, FALSE, -1); auto_reconnect (serv, FALSE, -1);
return (0); /* remove it (0) */ return (0); /* remove it (0) */
}
} }
return (1); /* call it more (1) */ return (1); /* call it more (1) */

View File

@@ -408,7 +408,7 @@ mg_attr_list_create (const XTextColor *col, int size)
static void static void
mg_create_tab_colors (void) mg_create_tab_colors (void)
{ {
XTextColor gui_palette[XTEXT_COLS]; XTextColor gui_palette[THEME_TOKEN_COUNT];
if (plain_list) if (plain_list)
{ {

View File

@@ -184,7 +184,7 @@ settings_restore_icon_search_path (void)
if (!icon_theme || !theme_gtk3_settings_state.icon_search_path_captured) if (!icon_theme || !theme_gtk3_settings_state.icon_search_path_captured)
return; return;
gtk_icon_theme_set_search_path (icon_theme, (const char * const *) theme_gtk3_settings_state.icon_search_path, theme_gtk3_settings_state.icon_search_path_count); gtk_icon_theme_set_search_path (icon_theme, (const char **) theme_gtk3_settings_state.icon_search_path, theme_gtk3_settings_state.icon_search_path_count);
gtk_icon_theme_rescan_if_needed (icon_theme); gtk_icon_theme_rescan_if_needed (icon_theme);
g_strfreev (theme_gtk3_settings_state.icon_search_path); g_strfreev (theme_gtk3_settings_state.icon_search_path);
theme_gtk3_settings_state.icon_search_path = NULL; theme_gtk3_settings_state.icon_search_path = NULL;