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:
parent
809f040bc3
commit
97fa77d27f
|
@ -1109,6 +1109,7 @@ FcDirChecksum (struct stat *statb)
|
||||||
source_date_epoch = getenv("SOURCE_DATE_EPOCH");
|
source_date_epoch = getenv("SOURCE_DATE_EPOCH");
|
||||||
if (source_date_epoch)
|
if (source_date_epoch)
|
||||||
{
|
{
|
||||||
|
errno = 0;
|
||||||
epoch = strtoull(source_date_epoch, &endptr, 10);
|
epoch = strtoull(source_date_epoch, &endptr, 10);
|
||||||
|
|
||||||
if (endptr == source_date_epoch)
|
if (endptr == source_date_epoch)
|
||||||
|
|
Loading…
Reference in New Issue