ldmud: various build fixes (#360262)

This commit is contained in:
Vladimír Čunát
2025-03-21 14:52:56 +01:00
3 changed files with 35 additions and 2 deletions
+4 -2
View File
@@ -7,7 +7,7 @@
, libiconv
, pcre
, libgcrypt
, libxcrypt
, libxcrypt-legacy
, json_c
, libxml2
, ipv6Support ? false
@@ -37,11 +37,13 @@ stdenv.mkDerivation rec {
sha256 = "sha256-PkrjP7tSZMaj61Hsn++7+CumhqFPLbf0+eAI6afP9HA=";
};
patches = [ ./libxml2-2.12.0-compat.patch ./mysql-compat.patch ];
sourceRoot = "${src.name}/src";
nativeBuildInputs =
[ autoreconfHook pkg-config bison ];
buildInputs = [ libgcrypt libxcrypt pcre json_c libxml2 ]
buildInputs = [ libgcrypt libxcrypt-legacy pcre json_c libxml2 ]
++ lib.optional mccpSupport zlib ++ lib.optional mysqlSupport libmysqlclient
++ lib.optional postgresSupport libpq
++ lib.optional sqliteSupport sqlite ++ lib.optional tlsSupport openssl
@@ -0,0 +1,18 @@
diff --git src/pkg-xml2.c src/pkg-xml2.c
index 048ca38c..9ea4de35 100644
--- src/pkg-xml2.c
+++ src/pkg-xml2.c
@@ -507,8 +507,13 @@ f_xml_generate (svalue_t *sp)
return sp;
}
+#if LIBXML_VERSION >= 21200
+static void
+xml_pkg_error_handler(void * userData, const xmlError *error)
+#else
static void
xml_pkg_error_handler(void * userData, xmlErrorPtr error)
+#endif
{
if (error)
{
+13
View File
@@ -0,0 +1,13 @@
diff --git src/autoconf/configure.ac src/autoconf/configure.ac
index 156e97f4..6d70bf33 100644
--- src/autoconf/configure.ac
+++ src/autoconf/configure.ac
@@ -1410,7 +1410,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <mysql.h>
#include <errmsg.h>
-struct MYSQL * foo(void)
+struct st_mysql * foo(void)
{
static MYSQL var;