From d242631245edb66816ef9960bdb2c61b68e56cec Mon Sep 17 00:00:00 2001
From: phosit <phosit@3db68df2-c116-0410-a063-a993310a9797>
Date: Wed, 13 Dec 2023 19:42:00 +0000
Subject: [PATCH] Fix build with libxml2 v2.12.1

Index: source/ps/XML/Xeromyces.cpp
--- source/ps/XML/Xeromyces.cpp.orig
+++ source/ps/XML/Xeromyces.cpp
@@ -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;
