From 4380f3820e5504b039d4a1ed0853c4442fa251b1 Mon Sep 17 00:00:00 2001 From: Calvin Buckley Date: Mon, 19 Nov 2018 13:58:51 +0000 Subject: [PATCH] Fix compilation of irc/core on AIX and IBM i There's a function in the standard library of these OSes that conflict with this function. Prefix it with `irc_`. --- src/irc/core/irc-cap.c | 2 +- src/irc/core/irc-cap.h | 3 ++- src/irc/core/irc-core.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/irc/core/irc-cap.c b/src/irc/core/irc-cap.c index 5ab8d94f..898a4a20 100644 --- a/src/irc/core/irc-cap.c +++ b/src/irc/core/irc-cap.c @@ -296,7 +296,7 @@ static void event_invalid_cap (IRC_SERVER_REC *server, const char *data, const c irc_send_cmd_now(server, "CAP END"); } -void cap_init (void) +void irc_cap_init (void) { signal_add_first("event cap", (SIGNAL_FUNC) event_cap); signal_add_first("event 410", (SIGNAL_FUNC) event_invalid_cap); diff --git a/src/irc/core/irc-cap.h b/src/irc/core/irc-cap.h index df957cd2..cbfeae62 100644 --- a/src/irc/core/irc-cap.h +++ b/src/irc/core/irc-cap.h @@ -1,7 +1,8 @@ #ifndef __IRC_CAP_H #define __IRC_CAP_H -void cap_init(void); +/* this is prefixed as to not conflict with an AIX/i function in their stdlib */ +void irc_cap_init(void); void cap_deinit(void); int cap_toggle (IRC_SERVER_REC *server, char *cap, int enable); void cap_finish_negotiation (IRC_SERVER_REC *server); diff --git a/src/irc/core/irc-core.c b/src/irc/core/irc-core.c index a9221e02..ccd84027 100644 --- a/src/irc/core/irc-core.c +++ b/src/irc/core/irc-core.c @@ -119,7 +119,7 @@ void irc_core_init(void) lag_init(); netsplit_init(); irc_expandos_init(); - cap_init(); + irc_cap_init(); sasl_init(); settings_check();