diff options
| author | Josh Stone <cuviper@gmail.com> | 2016-07-11 21:43:53 -0700 |
|---|---|---|
| committer | Josh Stone <cuviper@gmail.com> | 2016-07-11 21:43:53 -0700 |
| commit | 79fb5522bd5bf79c7dad7adfd516ad364dff3e9e (patch) | |
| tree | d130a67fc71d00d8d6b0bb39755556727fb00a8c /src/libsyntax/parse | |
| parent | 726fa9f09f467cd445758ac8b1bbe8a786aadc9b (diff) | |
| download | rust-79fb5522bd5bf79c7dad7adfd516ad364dff3e9e.tar.gz rust-79fb5522bd5bf79c7dad7adfd516ad364dff3e9e.zip | |
std: clear errno before readdir, then check it (solaris)
A `NULL` from `readdir` could be the end of stream or an error. The only way to know is to check `errno`, so it must be set to a known value first, like a 0 that POSIX will never use. This patch adds `set_errno`, uses it to clear the value before calling `readdir`, then checks it again after to see the reason for a `NULL`.
Diffstat (limited to 'src/libsyntax/parse')
0 files changed, 0 insertions, 0 deletions
