base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / li / light / 0001-define-light-loglevel-as-extern.patch
blob082f8f3f10e158037783e49257c006039a03b334
1 From 47f163f6bcd1d66bebc49d96abcf46853a0708fb Mon Sep 17 00:00:00 2001
2 From: wxt <3264117476@qq.com>
3 Date: Tue, 22 Oct 2024 07:48:34 +0800
4 Subject: [PATCH] fix build
6 ---
7 src/helpers.c | 1 +
8 src/helpers.h | 2 +-
9 2 files changed, 2 insertions(+), 1 deletion(-)
11 diff --git a/src/helpers.c b/src/helpers.c
12 index c7bc4de..00e6098 100644
13 --- a/src/helpers.c
14 +++ b/src/helpers.c
15 @@ -9,6 +9,7 @@
16 #include <errno.h> // errno
17 #include <libgen.h> // dirname
19 +light_loglevel_t light_loglevel;
21 bool light_file_read_uint64(char const *filename, uint64_t *val)
23 diff --git a/src/helpers.h b/src/helpers.h
24 index f73714b..4a92753 100644
25 --- a/src/helpers.h
26 +++ b/src/helpers.h
27 @@ -21,7 +21,7 @@ typedef enum {
28 LIGHT_NOTE_LEVEL
29 } light_loglevel_t;
31 -light_loglevel_t light_loglevel;
32 +extern light_loglevel_t light_loglevel;
34 #define LIGHT_LOG(lvl, fp, fmt, args...)\
35 if(light_loglevel >= lvl)\
36 --
37 2.46.1