Fix compilation errors

- add missing includes
- fix cast

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2021-12-14 19:01:21 +00:00
committed by Compute-Runtime-Automation
parent 854a77d1cf
commit 68dbbd7d43
2 changed files with 4 additions and 1 deletions

View File

@ -14,6 +14,7 @@
#include <climits>
#include <algorithm>
#include <array>
#include <cstring>
#include <fcntl.h>
#include <map>
@ -101,7 +102,7 @@ ssize_t PmtUtil::readTelem(std::string_view telemDir, const std::size_t count, c
telemFilename << telemDir << "/telem";
int fd = SysCalls::open(telemFilename.str().c_str(), O_RDONLY);
if (fd > 0) {
bytesRead = SysCalls::pread(fd, data, count, offset);
bytesRead = SysCalls::pread(fd, data, count, static_cast<off_t>(offset));
SysCalls::close(fd);
}
return bytesRead;

View File

@ -6,7 +6,9 @@
*/
#include <map>
#include <poll.h>
#include <string>
#include <string_view>
namespace NEO {