From 426400e7f6c9ac9088fc66c7c683ed9251fc8789 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 8 Jun 2025 11:43:25 +0200 Subject: build: Fix global variables declaration --- src/atom-writer.c | 1 + src/atom-writer.h | 2 +- src/gallery-utils.c | 2 +- src/stats.c | 4 ++++ src/stats.h | 6 +++--- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/atom-writer.c b/src/atom-writer.c index f7479a7..b9acfb6 100644 --- a/src/atom-writer.c +++ b/src/atom-writer.c @@ -33,6 +33,7 @@ #include "gallery-utils.h" +TAtomFeed *news_feed; TAtomFeed * diff --git a/src/atom-writer.h b/src/atom-writer.h index 2daa031..eea3d4d 100644 --- a/src/atom-writer.h +++ b/src/atom-writer.h @@ -52,7 +52,7 @@ typedef struct { /* Global instances */ -TAtomFeed *news_feed; +extern TAtomFeed *news_feed; TAtomFeed * atom_writer_new (); diff --git a/src/gallery-utils.c b/src/gallery-utils.c index 88a1fb3..d86f446 100644 --- a/src/gallery-utils.c +++ b/src/gallery-utils.c @@ -23,9 +23,9 @@ #include #include #include -#include #include "gallery-utils.h" +#include "stats.h" diff --git a/src/stats.c b/src/stats.c index 8469225..f858fff 100644 --- a/src/stats.c +++ b/src/stats.c @@ -21,6 +21,10 @@ #include "stats.h" +int stats_errors = 0; +int stats_dirs = 0; +int stats_images = 0; + G_LOCK_DEFINE_STATIC (stats_errors); G_LOCK_DEFINE_STATIC (stats_dirs); diff --git a/src/stats.h b/src/stats.h index 5f73f24..dafd0ba 100644 --- a/src/stats.h +++ b/src/stats.h @@ -21,9 +21,9 @@ /* Thread safe statistics counting */ -int stats_errors; -int stats_dirs; -int stats_images; +extern int stats_errors; +extern int stats_dirs; +extern int stats_images; void stats_errors_inc (); void stats_dirs_inc (); -- cgit v1.2.3