void-packages/srcpkgs/twoftpd/patches/log2-conflict.patch

63 lines
1.9 KiB
Diff

log2 is declared in math.h
Index: twoftpd-1.43/log.c
===================================================================
--- twoftpd-1.43.orig/log.c
+++ twoftpd-1.43/log.c
@@ -32,14 +32,14 @@ void log_start(void)
obuf_puts(&errbuf, "]: ");
}
-void log1(const char* a)
+void twoftpd_log1(const char* a)
{
log_start();
log_str(a);
log_end();
}
-void log2(const char* a, const char* b)
+void twoftpd_log2(const char* a, const char* b)
{
log_start();
log_str(a);
Index: twoftpd-1.43/log.h
===================================================================
--- twoftpd-1.43.orig/log.h
+++ twoftpd-1.43/log.h
@@ -8,7 +8,7 @@ extern void log_start(void);
#define log_uint(U) obuf_putu(&errbuf, U)
#define log_end() obuf_putsflush(&errbuf, "\n")
-extern void log1(const char*);
-extern void log2(const char*, const char*);
+extern void twoftpd_log1(const char*);
+extern void twoftpd_log2(const char*, const char*);
#endif
Index: twoftpd-1.43/main.c
===================================================================
--- twoftpd-1.43.orig/main.c
+++ twoftpd-1.43/main.c
@@ -171,18 +171,18 @@ static int dispatch_request(const comman
cmd = find_command(table1);
if (!cmd && table2) cmd = find_command(table2);
if (!cmd) {
- if (log) log2(request, req_param ? req_param : "(no parameter)");
+ if (log) twoftpd_log2(request, req_param ? req_param : "(no parameter)");
return respond(502, 1, "Command not supported.");
}
if (req_param) {
- if (log) log2(cmd->name, cmd->hideparam ? "XXXXXXXX" : req_param);
+ if (log) twoftpd_log2(cmd->name, cmd->hideparam ? "XXXXXXXX" : req_param);
if (cmd->fn1)
return cmd->fn1();
return respond(501, 1, "Command requires no parameter");
}
else {
- if (log) log1(cmd->name);
+ if (log) twoftpd_log1(cmd->name);
if (cmd->fn0)
return cmd->fn0();
return respond(504, 1, "Command requires a parameter");