summaryrefslogtreecommitdiff
path: root/net-irc/srain/files/430.patch
blob: f31481674033b1dc3dd7b050117cf6c72555758c (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 8542c455e63311e2062461966742e5f0fe42b16b Mon Sep 17 00:00:00 2001
From: Takuya Wakazono <pastalian46@gmail.com>
Date: Mon, 2 Dec 2024 21:06:07 +0900
Subject: [PATCH] Core(fix): remove bool typedef in C23

Also fixes an oversight in 7f27c419.
---
 src/core/app.c       | 2 +-
 src/filter/filter2.h | 2 +-
 src/inc/srain.h      | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/core/app.c b/src/core/app.c
index 78c0a2af..3e6393d4 100644
--- a/src/core/app.c
+++ b/src/core/app.c
@@ -234,7 +234,7 @@ SrnRet srn_application_add_server(SrnApplication *app, const char *name){
     SrnRet ret;
     SrnServerConfig *srv_cfg;
 
-    srv_cfg = srn_server_config_new(name);
+    srv_cfg = srn_server_config_new();
     ret = srn_config_manager_read_server_config(app->cfg_mgr, srv_cfg, name);
     if (!RET_IS_OK(ret)){
         goto ERR;
diff --git a/src/filter/filter2.h b/src/filter/filter2.h
index c953a767..9c23a14d 100644
--- a/src/filter/filter2.h
+++ b/src/filter/filter2.h
@@ -32,7 +32,7 @@ typedef struct _SrnMessageFilter SrnMessageFilter;
 struct _SrnMessageFilter {
     const char *name;
     void (*init) (void);
-    SrnRet (*filter) (const SrnMessage *msg);
+    bool (*filter) (const SrnMessage *msg);
     void (*finalize) (void);
 };
 
diff --git a/src/inc/srain.h b/src/inc/srain.h
index 323be391..96ae0834 100644
--- a/src/inc/srain.h
+++ b/src/inc/srain.h
@@ -22,7 +22,9 @@
 #include <stdint.h>
 #include <glib.h>
 
+#if defined __STDC_VERSION__ && __STDC_VERSION__ <= 201710L
 typedef gboolean bool;
+#endif
 
 /* General result value */
 #define SRN_OK      0