summarylogtreecommitdiffstats
path: root/fix-global-var.diff
blob: 6b564130db4f0c3fbfc41e58ced3bea9bdc96ffe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/src/helpers.c b/src/helpers.c
index c7bc4de..00e6098 100644
--- a/src/helpers.c
+++ b/src/helpers.c
@@ -9,6 +9,7 @@
 #include <errno.h> // errno
 #include <libgen.h> // dirname 
 
+light_loglevel_t light_loglevel;
 
 bool light_file_read_uint64(char const *filename, uint64_t *val)
 {
diff --git a/src/helpers.h b/src/helpers.h
index f73714b..4a92753 100644
--- a/src/helpers.h
+++ b/src/helpers.h
@@ -21,7 +21,7 @@ typedef enum {
     LIGHT_NOTE_LEVEL
 } light_loglevel_t;
 
-light_loglevel_t light_loglevel;
+extern light_loglevel_t light_loglevel;
 
 #define LIGHT_LOG(lvl, fp, fmt, args...)\
     if(light_loglevel >= lvl)\