Reset errno to do error handling properly

This fixes the weird behavior when running with SOURCE_DATE_EPOCH=0:

Fontconfig: SOURCE_DATE_EPOCH: strtoull: No such file or directory: 0
This commit is contained in:
Akira TAGOH 2019-04-03 11:49:42 +00:00
parent 809f040bc3
commit 97fa77d27f
1 changed files with 1 additions and 0 deletions

View File

@ -1109,6 +1109,7 @@ FcDirChecksum (struct stat *statb)
source_date_epoch = getenv("SOURCE_DATE_EPOCH");
if (source_date_epoch)
{
errno = 0;
epoch = strtoull(source_date_epoch, &endptr, 10);
if (endptr == source_date_epoch)