summaryrefslogtreecommitdiffstats
path: root/src/VBox/Runtime/r3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:45 +0000
commit04aecf1372d30eb709d8de65152535ab66dcb74a (patch)
treed1e4d8c453a76465e8b63119314a28d39b474479 /src/VBox/Runtime/r3
parentAdding upstream version 7.0.14-dfsg. (diff)
downloadvirtualbox-upstream/7.0.16-dfsg.tar.xz
virtualbox-upstream/7.0.16-dfsg.zip
Adding upstream version 7.0.16-dfsg.upstream/7.0.16-dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/VBox/Runtime/r3/win/process-win.cpp2
-rw-r--r--src/VBox/Runtime/r3/xml.cpp16
2 files changed, 15 insertions, 3 deletions
diff --git a/src/VBox/Runtime/r3/win/process-win.cpp b/src/VBox/Runtime/r3/win/process-win.cpp
index 18ed9ab0..8f84d231 100644
--- a/src/VBox/Runtime/r3/win/process-win.cpp
+++ b/src/VBox/Runtime/r3/win/process-win.cpp
@@ -730,7 +730,7 @@ static bool rtProcWinFindTokenByProcess(const char * const *papszNames, PSID pSi
for (size_t i = 0; papszNames[i] && !fFound; i++)
{
PROCESSENTRY32W ProcEntry;
- ProcEntry.dwSize = sizeof(PROCESSENTRY32);
+ ProcEntry.dwSize = sizeof(ProcEntry);
ProcEntry.szExeFile[0] = '\0';
if (g_pfnProcess32FirstW(hSnap, &ProcEntry))
{
diff --git a/src/VBox/Runtime/r3/xml.cpp b/src/VBox/Runtime/r3/xml.cpp
index a6661760..f96d45f5 100644
--- a/src/VBox/Runtime/r3/xml.cpp
+++ b/src/VBox/Runtime/r3/xml.cpp
@@ -1856,12 +1856,20 @@ static void xmlParserBaseGenericError(void *pCtx, const char *pszMsg, ...) RT_NO
va_end(args);
}
+#if LIBXML_VERSION >= 21206
+static void xmlStructuredErrorFunc(void *userData, const xmlError *error) RT_NOTHROW_DEF
+{
+ NOREF(userData);
+ NOREF(error);
+}
+#else
static void xmlParserBaseStructuredError(void *pCtx, xmlErrorPtr error) RT_NOTHROW_DEF
{
NOREF(pCtx);
/* we expect that there is always a trailing NL */
LogRel(("XML error at '%s' line %d: %s", error->file, error->line, error->message));
}
+#endif
XmlParserBase::XmlParserBase()
{
@@ -1870,7 +1878,11 @@ XmlParserBase::XmlParserBase()
throw std::bad_alloc();
/* per-thread so it must be here */
xmlSetGenericErrorFunc(NULL, xmlParserBaseGenericError);
+#if LIBXML_VERSION >= 21206
+ xmlSetStructuredErrorFunc(NULL, xmlStructuredErrorFunc);
+#else
xmlSetStructuredErrorFunc(NULL, xmlParserBaseStructuredError);
+#endif
}
XmlParserBase::~XmlParserBase()
@@ -1931,7 +1943,7 @@ void XmlMemParser::read(const void *pvBuf, size_t cbSize,
pcszFilename,
NULL, // encoding = auto
options)))
- throw XmlError(xmlCtxtGetLastError(m_ctxt));
+ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
doc.refreshInternals();
}
@@ -2191,7 +2203,7 @@ void XmlFileParser::read(const RTCString &strFilename,
pcszFilename,
NULL, // encoding = auto
options)))
- throw XmlError(xmlCtxtGetLastError(m_ctxt));
+ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
doc.refreshInternals();
}