summaryrefslogtreecommitdiff
path: root/bsd-misc.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-01-15 02:34:37 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-01-15 02:34:37 +0000
commit42202bc8cffb0932ac7e6c1eb483cd20176c01c9 (patch)
tree869bcc038453e50a38fc6c2cf7086d0b9201f502 /bsd-misc.c
parent200e3c9c9adfeafe431c7af1aeb7a3dd9d4ac130 (diff)
- (bal) utimes() support via utime() interface on machine that lack utimes().
Diffstat (limited to 'bsd-misc.c')
-rw-r--r--bsd-misc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/bsd-misc.c b/bsd-misc.c
index 2a0596593..2e59019bc 100644
--- a/bsd-misc.c
+++ b/bsd-misc.c
@@ -80,3 +80,15 @@ const char *strerror(int e)
80 return(sys_errlist[e]); 80 return(sys_errlist[e]);
81} 81}
82#endif 82#endif
83
84#ifndef HAVE_UTIMES
85int utimes(char *filename, struct timeval *tvp)
86{
87 struct utimbuf ub;
88
89 ub.actime = tvp->tv_sec;
90 ub.modtime = tvp->tv_usec;
91
92 return(utime(filename, &ub));
93}
94#endif