| #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__linux__) |
| /* do nothing -- futimes exists and is fine */ |
| #elif defined(__SunOS5_9__) |
| futimes(int fd, struct timeval *tv) |
| return futimesat(fd, 0, tv); |
| /* rename just in case -- linux provides an unusable one */ |
| #define futimes myfutimes |
| futimes(int fd, struct timeval *tv) |
| werrstr("futimes not available"); |
| dirfwstat(int fd, Dir *dir) |
| if(fchmod(fd, dir->mode) < 0) |
| tv[0].tv_sec = dir->mtime; |
| tv[1].tv_sec = dir->mtime; |
| if(ftruncate(fd, dir->length) < 0) |