From 0be199955266ac6129b0cbf0db87a04dd23e9118 Mon Sep 17 00:00:00 2001 From: cristei Date: Fri, 12 May 2023 11:09:08 +0300 Subject: [PATCH] Support MacOS --- .gitignore | 1 + meson.build | 2 +- src/history.c | 4 ++-- src/livecaptions-history-window.c | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 507a1aa..02114a1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ _build/* build-dir .flatpak-builder result +aprilv0_en-us.april diff --git a/meson.build b/meson.build index 16f01a3..8dfd7b3 100644 --- a/meson.build +++ b/meson.build @@ -36,5 +36,5 @@ subdir('po') gnome.post_install( glib_compile_schemas: true, gtk_update_icon_cache: true, - update_desktop_database: true, + update_desktop_database: false, ) diff --git a/src/history.c b/src/history.c index b4da2ca..5ca722a 100644 --- a/src/history.c +++ b/src/history.c @@ -51,8 +51,8 @@ void history_init(void){ static struct history_entry *allocate_new_entry(size_t tokens_count) { active_session.entries_count += 1; - active_session.entries = reallocarray(active_session.entries, - active_session.entries_count, sizeof(struct history_entry)); + active_session.entries = realloc(active_session.entries, + active_session.entries_count * sizeof(struct history_entry)); struct history_entry *entry = &active_session.entries[active_session.entries_count - 1]; diff --git a/src/livecaptions-history-window.c b/src/livecaptions-history-window.c index 3f4edbd..bf84dc2 100644 --- a/src/livecaptions-history-window.c +++ b/src/livecaptions-history-window.c @@ -127,6 +127,7 @@ static void add_session(LiveCaptionsHistoryWindow *self, const struct history_se FilterMode filter_mode = filter_profanity ? FILTER_PROFANITY : (filter_slurs ? FILTER_SLURS : FILTER_NONE); struct token_capitalizer tcap; + extern void token_capitalizer_init(struct token_capitalizer *tc); token_capitalizer_init(&tcap); for(size_t i_1=0; i_1entries_count; i_1++){