armcc compatibility, don't use EINTR if doesn't exist

Fixes #1081
This commit is contained in:
Ebrahim Byagowi 2018-06-28 14:32:36 +04:30 committed by GitHub
parent 8a51f91b70
commit 25970a93aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -617,7 +617,9 @@ fail_without_close:
unsigned long addition = fread (data + len, 1, allocated - len, fp);
int err = ferror (fp);
#ifdef EINTR // armcc doesn't have it
if (unlikely (err == EINTR)) continue;
#endif
if (unlikely (err)) goto fread_fail;
len += addition;