mirror of
https://git.freebsd.org/ports.git
synced 2025-07-01 01:20:31 -04:00
Changes: https://github.com/intel/intel-graphics-compiler/releases/tag/igc-1.0.8708 Reported by: GitHub (watch releases)
23 lines
757 B
Text
23 lines
757 B
Text
POSIX version of strerror_r returns int
|
|
|
|
visa/iga/IGALibrary/system.cpp:263:14: error: assigning to 'char *' from incompatible type 'int'
|
|
errMsg = strerror_r(errCode, buf, sizeof(buf));
|
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
--- visa/iga/IGALibrary/system.cpp.orig 2021-09-11 19:03:27 UTC
|
|
+++ visa/iga/IGALibrary/system.cpp
|
|
@@ -259,8 +259,13 @@ std::string iga::FormatLastError(unsigned errCode)
|
|
NULL);
|
|
if (errMsg)
|
|
msg = errMsg;
|
|
-#else
|
|
+#elif defined(__GLIBC__)
|
|
errMsg = strerror_r(errCode, buf, sizeof(buf));
|
|
+#else
|
|
+ if (strerror_r(errCode, buf, sizeof(buf)))
|
|
+ errMsg = nullptr;
|
|
+ else
|
|
+ errMsg = buf;
|
|
#endif // _WIN32
|
|
if (errMsg == nullptr || errMsg[0] == 0)
|
|
return "???";
|