mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
Fix compilation on windows, needs implementation of fs_getmtime on Windows
This commit is contained in:
parent
5119976c9f
commit
c033ad6828
|
@ -1694,11 +1694,15 @@ int fs_is_dir(const char *path)
|
||||||
|
|
||||||
time_t fs_getmtime(const char *path)
|
time_t fs_getmtime(const char *path)
|
||||||
{
|
{
|
||||||
|
#if defined(CONF_FAMILY_WINDOWS)
|
||||||
|
/* TODO */
|
||||||
|
#else
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
if (stat(path, &sb) == -1)
|
if (stat(path, &sb) == -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return sb.st_mtime;
|
return sb.st_mtime;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int fs_chdir(const char *path)
|
int fs_chdir(const char *path)
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include "detect.h"
|
#include "detect.h"
|
||||||
#include "stddef.h"
|
#include "stddef.h"
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
Loading…
Reference in a new issue