diff options
| author | Rich Felker <dalias@aerifal.cx> | 2015-05-06 18:53:22 -0400 | 
|---|---|---|
| committer | Rich Felker <dalias@aerifal.cx> | 2015-05-06 18:53:22 -0400 | 
| commit | ece0c48a603a58b26672ee2eeea7554991fcafa1 (patch) | |
| tree | cd6d73d5479c9f6456dd9594906de21aa3ffc923 /src | |
| parent | 484194dbf41758eec0ef62fef5fe9350c21b9241 (diff) | |
| download | musl-ece0c48a603a58b26672ee2eeea7554991fcafa1.tar.gz | |
fix futimes legacy function with null tv pointer
a null pointer is valid here and indicates that the current time
should be used. based on patch by Felix Janda, simplified.
Diffstat (limited to 'src')
| -rw-r--r-- | src/legacy/futimes.c | 1 | 
1 files changed, 1 insertions, 0 deletions
diff --git a/src/legacy/futimes.c b/src/legacy/futimes.c index d81d83a9..1c19eb1f 100644 --- a/src/legacy/futimes.c +++ b/src/legacy/futimes.c @@ -5,6 +5,7 @@  int futimes(int fd, const struct timeval tv[2])  {  	struct timespec times[2]; +	if (!tv) return futimens(fd, 0);  	times[0].tv_sec  = tv[0].tv_sec;  	times[0].tv_nsec = tv[0].tv_usec * 1000;  	times[1].tv_sec  = tv[1].tv_sec;  | 
