Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldmud: various build fixes #360262

Merged
merged 3 commits into from
Mar 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkgs/games/ldmud/default.nix
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions pkgs/games/ldmud/libxml2-2.12.0-compat.patch
Original file line number Diff line number Diff line change
@@ -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 changes: 13 additions & 0 deletions pkgs/games/ldmud/mysql-compat.patch
Original file line number Diff line number Diff line change
@@ -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;