1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 12:45:20 +03:00
aports/unmaintained/intel-graphics-compiler/xsi_strerror_r.patch
psykose 457cc13e24
unmaintained/intel-graphics-compiler: move from testing
not installable, can't install due to missing dependencies, doesn't
build

see: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/35445
2022-08-01 03:26:18 +02:00

25 lines
799 B
Diff

--- intel-graphics-compiler-igc-1.0.8744/visa/iga/IGALibrary/system.cpp 2021-09-16 11:50:38.000000000 +0300
+++ intel-graphics-compiler-igc-1.0.8744/visa/iga/IGALibrary/system.cpp 2021-10-03 14:59:08.779865094 +0300
@@ -246,9 +246,8 @@
{
std::string msg;
char buf[256] {0};
- char *errMsg = nullptr;
+ char *errMsg = &buf[0];
#ifdef _WIN32
- errMsg = &buf[0];
FormatMessageA(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
@@ -260,9 +259,9 @@
if (errMsg)
msg = errMsg;
#else
- errMsg = strerror_r(errCode, buf, sizeof(buf));
+ strerror_r(errCode, buf, sizeof(buf));
#endif // _WIN32
- if (errMsg == nullptr || errMsg[0] == 0)
+ if (errMsg[0] == 0)
return "???";
return std::string(errMsg);
}