Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
As long as we have lustre hack flags, let's at least compile with -O0,
[fs/lustre-release.git]
/
libsysio
/
src
/
utime.c
diff --git
a/libsysio/src/utime.c
b/libsysio/src/utime.c
index
1124663
..
d4f15cc
100644
(file)
--- a/
libsysio/src/utime.c
+++ b/
libsysio/src/utime.c
@@
-41,6
+41,7
@@
* lee@sandia.gov
*/
* lee@sandia.gov
*/
+#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include <string.h>
#include <errno.h>
#include <time.h>
@@
-50,11
+51,22
@@
#include <sys/stat.h>
#include <unistd.h>
#include <sys/queue.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/queue.h>
+#include <sys/time.h>
#include "sysio.h"
#include "inode.h"
#include "file.h"
#include "sysio.h"
#include "inode.h"
#include "file.h"
+time_t
+_sysio_local_time()
+{
+ struct timeval tv;
+
+ if (gettimeofday(&tv, NULL) != 0)
+ abort();
+ return tv.tv_sec;
+}
+
int
SYSIO_INTERFACE_NAME(utime)(const char *path, const struct utimbuf *buf)
{
int
SYSIO_INTERFACE_NAME(utime)(const char *path, const struct utimbuf *buf)
{
@@
-69,7
+81,7
@@
SYSIO_INTERFACE_NAME(utime)(const char *path, const struct utimbuf *buf)
if (err)
goto out;
if (!buf) {
if (err)
goto out;
if (!buf) {
- _utbuffer.actime = _utbuffer.modtime =
time(NULL
);
+ _utbuffer.actime = _utbuffer.modtime =
_SYSIO_LOCAL_TIME(
);
buf = &_utbuffer;
}
(void )memset(&stbuf, 0, sizeof(struct intnl_stat));
buf = &_utbuffer;
}
(void )memset(&stbuf, 0, sizeof(struct intnl_stat));