From d105f239f4dd8c4a11e1796f6b7562d7b0216103 Mon Sep 17 00:00:00 2001 From: codemaster Date: Sun, 28 Nov 2004 04:52:54 +0000 Subject: - Added a cure for gettimeofday() for Win32 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@398 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/ladmin/ladmin.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/ladmin/ladmin.c b/src/ladmin/ladmin.c index 497f3bdab..c8b0d60f0 100644 --- a/src/ladmin/ladmin.c +++ b/src/ladmin/ladmin.c @@ -6,27 +6,41 @@ /////////////////////////////////////////////////////////////////////////// #include +#include +#ifdef WIN32 +#define WIN32_LEAN_AND_MEAN +#include +void Gettimeofday(struct timeval *timenow) +{ + time_t t; + t = clock(); + timenow->tv_usec = t; + timenow->tv_sec = t / CLK_TCK; + return; +} +#define gettimeofday(timenow, dummy) Gettimeofday(timenow) +#else #include -#include -#include #include #include // gettimeofday -#include #include #include // close +#include // inet_addr +#include // gethostbyname +#endif +#include +#include #include #include #include // str* -#include // inet_addr -#include // gethostbyname #include // valist #include // tolower -#include "core.h" -#include "socket.h" +#include "../common/core.h" +#include "../common/socket.h" #include "ladmin.h" -#include "version.h" -#include "mmo.h" +#include "../common/version.h" +#include "../common/mmo.h" #ifdef PASSWORDENC #include "md5calc.h" -- cgit v1.2.3-70-g09d2