* Request to apply the patch to cgit's master branch
[not found] <af63c07a-15d6-4554-a418-ffe1456eecf9@yandex.ru>
@ 2024-06-10 11:03 ` Денис Пронин
0 siblings, 0 replies; only message in thread
From: Денис Пронин @ 2024-06-10 11:03 UTC (permalink / raw)
To: cgit
[-- Attachment #1: Type: text/plain, Size: 264 bytes --]
Hi,
My name is Denis and I kindly ask you to apply the patch, which I have
prepared, to master branch
The patch is in attachments
The issue occurs when clang is used as a compiler, see details in the patch
Thank you in advance and I hope you apply the patch
[-- Attachment #2: 0001-fix-building-with-clang.patch --]
[-- Type: text/x-patch, Size: 2360 bytes --]
From cee7818e1c50dbac59a805259fc9963050c61361 Mon Sep 17 00:00:00 2001
From: Denis Pronin <dannftk@yandex.ru>
Date: Sun, 9 Jun 2024 09:41:36 +0300
Subject: [PATCH] fix building with clang
fix error that is given because of macro overlapping cgit_filter member:
../filter.c:388:10: error: no member named '__fprintf_chk' in
'struct cgit_filter'
388 | filter->fprintf(filter, f, prefix);
| ~~~~~~ ^
/usr/include/bits/stdio2.h:92:3: note: expanded from macro 'fprintf'
92 | __fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
| ^
1 error generated.
Signed-off-by: Denis Pronin <dannftk@yandex.ru>
---
cgit.h | 2 +-
filter.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cgit.h b/cgit.h
index ddd2ccb..c081e2a 100644
--- a/cgit.h
+++ b/cgit.h
@@ -65,7 +65,7 @@ typedef enum {
struct cgit_filter {
int (*open)(struct cgit_filter *, va_list ap);
int (*close)(struct cgit_filter *);
- void (*fprintf)(struct cgit_filter *, FILE *, const char *prefix);
+ void (*fprintfp)(struct cgit_filter *, FILE *, const char *prefix);
void (*cleanup)(struct cgit_filter *);
int argument_count;
};
diff --git a/filter.c b/filter.c
index 70f5b74..22b4970 100644
--- a/filter.c
+++ b/filter.c
@@ -128,7 +128,7 @@ void cgit_exec_filter_init(struct cgit_exec_filter *filter, char *cmd, char **ar
memset(filter, 0, sizeof(*filter));
filter->base.open = open_exec_filter;
filter->base.close = close_exec_filter;
- filter->base.fprintf = fprintf_exec_filter;
+ filter->base.fprintfp = fprintf_exec_filter;
filter->base.cleanup = cleanup_exec_filter;
filter->cmd = cmd;
filter->argv = argv;
@@ -353,7 +353,7 @@ static struct cgit_filter *new_lua_filter(const char *cmd, int argument_count)
memset(filter, 0, sizeof(*filter));
filter->base.open = open_lua_filter;
filter->base.close = close_lua_filter;
- filter->base.fprintf = fprintf_lua_filter;
+ filter->base.fprintfp = fprintf_lua_filter;
filter->base.cleanup = cleanup_lua_filter;
filter->base.argument_count = argument_count;
filter->script_file = xstrdup(cmd);
@@ -385,7 +385,7 @@ int cgit_close_filter(struct cgit_filter *filter)
void cgit_fprintf_filter(struct cgit_filter *filter, FILE *f, const char *prefix)
{
- filter->fprintf(filter, f, prefix);
+ filter->fprintfp(filter, f, prefix);
}
--
2.44.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-10 11:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <af63c07a-15d6-4554-a418-ffe1456eecf9@yandex.ru>
2024-06-10 11:03 ` Request to apply the patch to cgit's master branch Денис Пронин
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).