mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 22:07:19 +02:00
Fix bool type and conflicting types errors. ``` In file included from date.c:28: setup.h:4:13: error: 'bool' cannot be defined via 'typedef' 4 | typedef int bool; | ^~~~ setup.h:4:13: note: 'bool' is a keyword with '-std=c23' onwards setup.h:4:1: warning: useless type name in empty declaration 4 | typedef int bool; | ^~~~~~~ ``` ``` file.c:670:7: error: conflicting types for 'msg_href'; have 'char *(struct emailinfo *, struct emailinfo *, _Bool)' 670 | char *msg_href(struct emailinfo *to_email, struct emailinfo *from_email, bool generate_markup) | ^~~~~~~~ In file included from hypermail.h:426, from file.c:27: proto.h:48:7: note: previous declaration of 'msg_href' with type 'char *(struct emailinfo *, struct emailinfo *, int)' 48 | char *msg_href(struct emailinfo *, struct emailinfo *, int); | ^~~~~~~~ ```
27 lines
924 B
Diff
27 lines
924 B
Diff
diff -ruN a/src/proto.h b/src/proto.h
|
|
--- a/src/proto.h 2019-11-19 15:08:24.000000000 +0000
|
|
+++ b/src/proto.h 2025-07-30 19:58:13.700000000 +0000
|
|
@@ -45,7 +45,7 @@
|
|
int is_empty_archive(void);
|
|
void symlink_latest(void);
|
|
struct emailsubdir *msg_subdir(int, time_t);
|
|
-char *msg_href(struct emailinfo *, struct emailinfo *, int);
|
|
+char *msg_href(struct emailinfo *, struct emailinfo *, bool);
|
|
char *msg_relpath(struct emailinfo *, struct emailinfo *);
|
|
char *articlehtmlfilename(struct emailinfo *);
|
|
char *htmlfilename(const char *, struct emailinfo *, const char *);
|
|
diff -ruN a/src/setup.h b/src/setup.h
|
|
--- a/src/setup.h 2019-11-19 15:08:24.000000000 +0000
|
|
+++ b/src/setup.h 2025-07-30 19:49:51.140000000 +0000
|
|
@@ -1,7 +1,9 @@
|
|
#ifndef __SETUP_H
|
|
#define __SETUP_H
|
|
|
|
-typedef int bool;
|
|
+#if __STDC_VERSION__ < 202311L
|
|
+ typedef int bool;
|
|
+#endif
|
|
|
|
struct Config {
|
|
char *label; /* the real-name of what to set */
|