From 7dfb23b93d6e69bea81a577dfa3c35a209603d45 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Sun, 8 Jan 2006 11:32:35 +0000 Subject: Make irc/xaric buildable on 4.x and 6.x. --- irc/xaric/Makefile | 1 + irc/xaric/files/patch-iflist.c | 11 +++++++++++ irc/xaric/files/patch-misc.c | 15 ++++++++++++--- irc/xaric/files/patch-numbers.c | 20 ++++++++++++++------ 4 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 irc/xaric/files/patch-iflist.c (limited to 'irc/xaric') diff --git a/irc/xaric/Makefile b/irc/xaric/Makefile index c5cfa0b1a5b6..95cba0c5b524 100644 --- a/irc/xaric/Makefile +++ b/irc/xaric/Makefile @@ -7,6 +7,7 @@ PORTNAME= xaric PORTVERSION= 0.13.1 +PORTREVISION= 1 CATEGORIES= irc MASTER_SITES= http://rf.cx/code/xaric/releases/ diff --git a/irc/xaric/files/patch-iflist.c b/irc/xaric/files/patch-iflist.c new file mode 100644 index 000000000000..9d6d64d3c896 --- /dev/null +++ b/irc/xaric/files/patch-iflist.c @@ -0,0 +1,11 @@ +--- iflist.c.orig Sun Jan 8 08:18:32 2006 ++++ iflist.c Sun Jan 8 08:18:36 2006 +@@ -184,7 +184,7 @@ + c->thr_ifcb = callback; + c->thr_data = data; + +- return THR_CREATE(ifaces_r, c); ++ return (int)THR_CREATE(ifaces_r, c); + } + + /** diff --git a/irc/xaric/files/patch-misc.c b/irc/xaric/files/patch-misc.c index 09195173b8ae..501384097ad9 100644 --- a/irc/xaric/files/patch-misc.c +++ b/irc/xaric/files/patch-misc.c @@ -1,11 +1,20 @@ ---- misc.c.orig Sun Jan 8 07:56:40 2006 -+++ misc.c Sun Jan 8 07:57:39 2006 +--- misc.c.orig Wed Nov 30 11:06:26 2005 ++++ misc.c Sun Jan 8 21:45:27 2006 +@@ -104,7 +104,7 @@ + + char *convert_time(time_t ltime) + { +- time_t days = 0, hours = 0, minutes = 0, seconds = 0; ++ unsigned int days = 0, hours = 0, minutes = 0, seconds = 0; + static char buffer[100]; + + *buffer = '\0'; @@ -114,7 +114,7 @@ ltime = (ltime - minutes) / 60; hours = ltime % 24; days = (ltime - hours) / 24; - sprintf(buffer, "%2ldd %2ldh %2ldm %2lds", days, hours, minutes, seconds); -+ sprintf(buffer, "%2dd %2dh %2dm %2ds", days, hours, minutes, seconds); ++ sprintf(buffer, "%2ud %2uh %2um %2us", days, hours, minutes, seconds); return (*buffer ? buffer : empty_str); } diff --git a/irc/xaric/files/patch-numbers.c b/irc/xaric/files/patch-numbers.c index f354a3e485e2..34e658aac16d 100644 --- a/irc/xaric/files/patch-numbers.c +++ b/irc/xaric/files/patch-numbers.c @@ -1,11 +1,19 @@ ---- numbers.c.orig Sun Jan 8 07:57:54 2006 -+++ numbers.c Sun Jan 8 07:58:02 2006 -@@ -986,7 +986,7 @@ +--- numbers.c.orig Wed Nov 30 11:06:26 2005 ++++ numbers.c Sun Jan 8 22:22:04 2006 +@@ -980,14 +980,14 @@ + + case 329: /* #define CREATION_TIME 329 */ + { +- time_t tme; ++ unsigned long tme; + char *this_sucks; + struct channel *chan = NULL; if (!ArgList[1] || !*ArgList[1]) break; -- sscanf(ArgList[1], "%lu", &tme); -+ sscanf(ArgList[1], "%u", &tme); - this_sucks = ctime(&tme); + sscanf(ArgList[1], "%lu", &tme); +- this_sucks = ctime(&tme); ++ this_sucks = ctime((time_t *)&tme); this_sucks[strlen(this_sucks) - 1] = '\0'; + message_from(ArgList[0], LOG_CRAP); -- cgit v1.2.3