****EDIT: Read the 2nd post - don't copy and paste this patch, the forums screw up formatting. I posted a txt file as well as a pastebin of the correct patch in the 2nd post.
Ok, on modern linuxes, for 6f6, this should work.
- Code: Select all
diff -Naur darkbot6f6/darkbot.c darkbot6f6-new/darkbot.c
--- darkbot6f6/darkbot.c 2001-12-17 15:29:05.000000000 -0500
+++ darkbot6f6-new/darkbot.c 2010-02-09 09:59:59.000000000 -0500
@@ -3476,8 +3476,7 @@
strlwr (s2);^M
if (*s2 == '~') {^M
S^M
- ("PRIVMSG %s :%s, rdb files can only be called from the data of a ***, they cannot be used in the^M
- *** itself.\n",^M
+ ("PRIVMSG %s :%s, rdb files can only be called from the data of a ***, they cannot be used in the *** itself.\n",^M
target, source);^M
R;^M
}^M
diff -Naur darkbot6f6/defines.h darkbot6f6-new/defines.h
--- darkbot6f6/defines.h 2001-12-17 15:29:09.000000000 -0500
+++ darkbot6f6-new/defines.h 2010-02-09 09:59:51.000000000 -0500
@@ -21,7 +21,7 @@
/* Please note that the below defines are the RECOMMENDED settings! */
/* So if you don't know if you should change something, leave it :) */
-#define NEED_CLOCK_T OFF
+#define NEED_CLOCK_T ON
/**
* If you have Mandrake, or are getting errors complaining
* about clock_t and CLOCKS_PER_SEC not being available,
Just save this to a file (in the example below, it's called darkbot-diff).
Then, to compile your darkbot, just do this:
- Code: Select all
cd /some/dir
wget http://darkbot.sourceforge.net/archive/unix/darkbot-6f6-r6.tar.gz
tar -xzvf darkbot-6f6-r6.tar.gz
patch -p0 < darkbot-diff
cd darkbot6f6
./configure
(continue as normal)
I don't know how to get rid of the built in log warning on compile, but w/e.
This works on Centos 5.4, and thus probably RedHat Enterprise major version 5, as well as fedora / fedora core 6-10. This was using gcc 4.1.2, but it's redhat's gcc which has a lot of stuff backported from 4.2. It might work on other modern linuxes as well.
Hit me up on irc.coldfront.net with any questions, but this isn't really a complex patch, it just preemptively turns on clock stuff and takes out a spurious newline.
