mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
make it compile on linux too
svn path=/trunk/; revision=4025
This commit is contained in:
parent
e5057ddea7
commit
d0d1b840ca
1 changed files with 54 additions and 41 deletions
|
@ -1,6 +1,13 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <sys/utime.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -36,8 +43,10 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
char* path;
|
||||
FILE* file;
|
||||
#ifdef WIN32
|
||||
time_t now;
|
||||
struct utimbuf fnow;
|
||||
#endif
|
||||
|
||||
if (argc != 2)
|
||||
{
|
||||
|
@ -59,10 +68,14 @@ int main(int argc, char* argv[])
|
|||
|
||||
close(file);
|
||||
|
||||
#ifdef WIN32
|
||||
now = time();
|
||||
fnow.actime = now;
|
||||
fnow.modtime = now;
|
||||
(int) utime(path, &fnow);
|
||||
#else
|
||||
(int) utimes(path, NULL);
|
||||
#endif
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue