From 634bcc63b7adff53d817c19195c4060170eeecfc Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 14 Jun 2013 13:33:02 -0300 Subject: Fixed the '"__USE_GNU" redefined' warnings on selected platforms Special Thanks to Takkun~! Signed-off-by: shennetsind --- src/common/strlib.h | 10 +++++++--- src/plugins/db2sql.c | 12 ++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/common/strlib.h b/src/common/strlib.h index 4a073c3bc..9b1875d45 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -8,9 +8,13 @@ #include "../common/cbasetypes.h" #include -#define __USE_GNU // required to enable strnlen on some platforms -#include -#undef __USE_GNU +#ifndef __USE_GNU + #define __USE_GNU // required to enable strnlen on some platforms + #include + #undef __USE_GNU +#else + #include +#endif #ifdef WIN32 #define HAVE_STRTOK_R diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index d56fd9546..723a3cc94 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -1,18 +1,18 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#include -#include -#include "../config/core.h" -#include "../common/HPMi.h" +#include "../common/cbasetypes.h" #include "../common/strlib.h" -#include "../common/SQL.h" #include "../common/timer.h" +#include "../common/HPMi.h" +#include "../common/mmo.h" +#include "../config/core.h" #include "../map/clif.h" #include "../map/pc.h" #include "../map/map.h" #include "../map/itemdb.h" - +#include +#include HPExport struct hplugin_info pinfo = { "DB2SQL", // Plugin name -- cgit v1.2.3-70-g09d2