summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-14 13:33:02 -0300
committerEuphy <euphy@rathena.org>2013-06-15 15:58:01 -0400
commit533c8b3500aad49f0b00423c69e44ac8afa9faf0 (patch)
treec4086501b27bc96972e70bebd4d6e8aac463279f
parentc08599f817172814aa993b2c40f69b21e92d9caa (diff)
downloadhercules-533c8b3500aad49f0b00423c69e44ac8afa9faf0.tar.gz
hercules-533c8b3500aad49f0b00423c69e44ac8afa9faf0.tar.bz2
hercules-533c8b3500aad49f0b00423c69e44ac8afa9faf0.tar.xz
hercules-533c8b3500aad49f0b00423c69e44ac8afa9faf0.zip
Fixed the '"__USE_GNU" redefined' warnings on selected platforms
Special Thanks to Takkun~! Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--src/common/strlib.h10
-rw-r--r--src/plugins/db2sql.c12
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 <stdarg.h>
-#define __USE_GNU // required to enable strnlen on some platforms
-#include <string.h>
-#undef __USE_GNU
+#ifndef __USE_GNU
+ #define __USE_GNU // required to enable strnlen on some platforms
+ #include <string.h>
+ #undef __USE_GNU
+#else
+ #include <string.h>
+#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 <stdio.h>
-#include <stdlib.h>
-#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 <stdio.h>
+#include <stdlib.h>
HPExport struct hplugin_info pinfo = {
"DB2SQL", // Plugin name