Module Name: src Committed By: rillig Date: Wed Sep 2 04:19:52 UTC 2020
Modified Files: src/usr.bin/make: dir.c Log Message: make(1): fix aliasing problem in cached_stat from the previous commit When the struct stat was used for both calling the actual stat and for returning the result, no copying was needed. This also had the side effect that for the first call of cached_stat, the returned struct stat included all the fields properly filled in, and on later calls, these fields were all zeroed out. These two variables are separate now, thus the fields need to be copied explicitly. There are no existing unit tests for this, but ./build.sh failed reliably. To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/usr.bin/make/dir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.