#include <sys/resource.h>
#include <dlfcn.h>
#include <getopt.h>
-/* This is just to be completely certain that the change which fixed getrusage on RH7 doesn't break anything else -- Om */
+
+/* Some systems don't define RUSAGE_SELF. This should fix them. */
#ifndef RUSAGE_SELF
-#define RUSAGE_SELF 0
+ #define RUSAGE_SELF 0
#endif
+
#endif
#include <exception>
return false;
}
}
+ Module* m = NULL;
+ ircd_module* a = NULL;
try
{
- ircd_module* a = new ircd_module(this, modfile);
+ a = new ircd_module(this, modfile);
factory[this->ModCount+1] = a;
if (factory[this->ModCount+1]->LastError())
{
}
if ((long)factory[this->ModCount+1]->factory != -1)
{
- Module* m = factory[this->ModCount+1]->factory->CreateModule(this);
+ m = factory[this->ModCount+1]->factory->CreateModule(this);
Version v = m->GetVersion();
if (v.API != API_VERSION)
{
delete m;
- delete a;
this->Log(DEFAULT,"Unable to load %s: Incorrect module API version: %d (our version: %d)",modfile,v.API,API_VERSION);
snprintf(MODERR,MAXBUF,"Loader/Linker error: Incorrect module API version: %d (our version: %d)",v.API,API_VERSION);
return false;