Merge branch 'gnome-updates'
[jackhill/guix/guix.git] / gnu / packages / patches / ninja-zero-mtime.patch
1 Work around a design defect in Ninja whereby a zero mtime is used to
2 denote missing files (we happen to produce files that have a zero mtime
3 and yet really do exist.)
4
5 --- ninja-1.5.3/src/disk_interface.cc 2014-11-24 18:37:47.000000000 +0100
6 +++ ninja-1.5.3/src/disk_interface.cc 2015-07-18 23:20:38.572290139 +0200
7 @@ -194,6 +194,12 @@ TimeStamp RealDiskInterface::Stat(const
8 }
9 return -1;
10 }
11 +
12 + if (st.st_mtime == 0)
13 + // All the code assumes that mtime == 0 means "file missing". Here we
14 + // know the file is not missing, so tweak the mtime.
15 + st.st_mtime = 1;
16 +
17 return st.st_mtime;
18 #endif
19 }