Fix build with libxml2 v2.12.1
libxml2 v2.12.1 includes less header indirectly. Also `xmlError*` has to be changed to `const xmlError*`. Original Patch By: Riesi Accepted By: @vladislavbelov Differential Revision: https://code.wildfiregames.com/D5219 This was SVN commit r27980.
This commit is contained in:
parent
a719a2176b
commit
d7001de399
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2018 Wildfire Games.
|
||||
/* Copyright (C) 2023 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -28,8 +28,9 @@
|
||||
#include "FUtils/FUDaeSyntax.h"
|
||||
#include "FUtils/FUFileManager.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <libxml/xmlerror.h>
|
||||
|
||||
void require_(int line, bool value, const char* type, const char* message)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2009 Wildfire Games.
|
||||
/* Copyright (C) 2023 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -23,6 +23,8 @@
|
||||
|
||||
#include "FUtils/FUXmlParser.h"
|
||||
|
||||
#include <libxml/parser.h>
|
||||
|
||||
/*
|
||||
|
||||
Things that are fixed here:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2023 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -25,9 +25,11 @@
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Filesystem.h"
|
||||
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/relaxng.h>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <type_traits>
|
||||
|
||||
TIMER_ADD_CLIENT(xml_validation);
|
||||
|
||||
@ -46,7 +48,8 @@ void ClearSchemaCache()
|
||||
g_SchemaCache.clear();
|
||||
}
|
||||
|
||||
static void relaxNGErrorHandler(void* UNUSED(userData), xmlErrorPtr error)
|
||||
static void relaxNGErrorHandler(void* UNUSED(userData),
|
||||
std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>* error)
|
||||
{
|
||||
// Strip a trailing newline
|
||||
std::string message = error->message;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2023 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -33,12 +33,14 @@
|
||||
#include "Xeromyces.h"
|
||||
|
||||
#include <libxml/parser.h>
|
||||
#include <type_traits>
|
||||
|
||||
static std::mutex g_ValidatorCacheLock;
|
||||
static std::map<const std::string, RelaxNGValidator> g_ValidatorCache;
|
||||
static bool g_XeromycesStarted = false;
|
||||
|
||||
static void errorHandler(void* UNUSED(userData), xmlErrorPtr error)
|
||||
static void errorHandler(void* UNUSED(userData),
|
||||
std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>* error)
|
||||
{
|
||||
// Strip a trailing newline
|
||||
std::string message = error->message;
|
||||
|
Loading…
Reference in New Issue
Block a user