diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c index d8680b48793..e631cb9a2dc 100644 --- a/src/mesa/drivers/dri/i965/brw_performance_query.c +++ b/src/mesa/drivers/dri/i965/brw_performance_query.c @@ -1718,7 +1718,8 @@ read_file_uint64(const char *file, uint64_t *val) fd = open(file, 0); if (fd < 0) return false; - n = read(fd, buf, sizeof (buf) - 1); + while ((n = read(fd, buf, sizeof (buf) - 1)) < 0 && + errno == EINTR); close(fd); if (n < 0) return false;