From c59eb28d803c8c5b74ef14ebd0d1694910faa609 Mon Sep 17 00:00:00 2001 From: Justin Chen <42143810+StarryReverie@users.noreply.github.com> Date: Thu, 12 Feb 2026 16:23:26 +0800 Subject: [PATCH] libstrophe: use patch from upstream --- pkgs/by-name/li/libstrophe/package.nix | 8 ++- pkgs/by-name/li/libstrophe/pointer-cast.patch | 65 ------------------- 2 files changed, 6 insertions(+), 67 deletions(-) delete mode 100644 pkgs/by-name/li/libstrophe/pointer-cast.patch diff --git a/pkgs/by-name/li/libstrophe/package.nix b/pkgs/by-name/li/libstrophe/package.nix index a1d603f7485a..d6b75f366647 100644 --- a/pkgs/by-name/li/libstrophe/package.nix +++ b/pkgs/by-name/li/libstrophe/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch2, autoreconfHook, libtool, openssl, @@ -24,8 +25,11 @@ stdenv.mkDerivation (finalAttrs: { patches = [ # Newer GCC rejects implicitly weak-typed pointer casting. - # Upstream PR: https://github.com/strophe/libstrophe/pull/267 - ./pointer-cast.patch + (fetchpatch2 { + name = "pointer-cast.patch"; + url = "https://github.com/strophe/libstrophe/commit/dfb3e868248d86fc0f5553dffbb6f7c367c3c383.patch?full_index=1"; + hash = "sha256-ALr2I53hGHW3OycKDdoXkNgANSYw1kUSYGqmAHkMq5E="; + }) ]; nativeBuildInputs = [ diff --git a/pkgs/by-name/li/libstrophe/pointer-cast.patch b/pkgs/by-name/li/libstrophe/pointer-cast.patch deleted file mode 100644 index b929636e021f..000000000000 --- a/pkgs/by-name/li/libstrophe/pointer-cast.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff --git a/src/handler.c b/src/handler.c -index 1c9bf9f..168df75 100644 ---- a/src/handler.c -+++ b/src/handler.c -@@ -320,7 +320,7 @@ static void _timed_handler_delete(xmpp_ctx_t *ctx, - */ - void xmpp_timed_handler_delete(xmpp_conn_t *conn, xmpp_timed_handler handler) - { -- _timed_handler_delete(conn->ctx, &conn->timed_handlers, handler); -+ _timed_handler_delete(conn->ctx, &conn->timed_handlers, (xmpp_void_handler)handler); - } - - static void _id_handler_add(xmpp_conn_t *conn, -@@ -349,7 +349,7 @@ static void _id_handler_add(xmpp_conn_t *conn, - return; - - item->user_handler = user_handler; -- item->handler = handler; -+ item->handler = (xmpp_void_handler)handler; - item->userdata = userdata; - item->enabled = 0; - item->next = NULL; -@@ -451,7 +451,7 @@ static void _handler_add(xmpp_conn_t *conn, - - memset(item, 0, sizeof(*item)); - item->user_handler = user_handler; -- item->handler = handler; -+ item->handler = (xmpp_void_handler)handler; - item->userdata = userdata; - - if (_dup_string(conn->ctx, ns, &item->u.ns)) -@@ -530,7 +530,7 @@ void xmpp_timed_handler_add(xmpp_conn_t *conn, - unsigned long period, - void *userdata) - { -- _timed_handler_add(conn->ctx, &conn->timed_handlers, handler, period, -+ _timed_handler_add(conn->ctx, &conn->timed_handlers, (xmpp_void_handler)handler, period, - userdata, 1); - } - -@@ -548,7 +548,7 @@ void handler_add_timed(xmpp_conn_t *conn, - unsigned long period, - void *userdata) - { -- _timed_handler_add(conn->ctx, &conn->timed_handlers, handler, period, -+ _timed_handler_add(conn->ctx, &conn->timed_handlers, (xmpp_void_handler)handler, period, - userdata, 0); - } - -@@ -747,7 +747,7 @@ void xmpp_global_timed_handler_add(xmpp_ctx_t *ctx, - unsigned long period, - void *userdata) - { -- _timed_handler_add(ctx, &ctx->timed_handlers, handler, period, userdata, 1); -+ _timed_handler_add(ctx, &ctx->timed_handlers, (xmpp_void_handler)handler, period, userdata, 1); - } - - /** Delete a global timed handler. -@@ -760,5 +760,5 @@ void xmpp_global_timed_handler_add(xmpp_ctx_t *ctx, - void xmpp_global_timed_handler_delete(xmpp_ctx_t *ctx, - xmpp_global_timed_handler handler) - { -- _timed_handler_delete(ctx, &ctx->timed_handlers, handler); -+ _timed_handler_delete(ctx, &ctx->timed_handlers, (xmpp_void_handler)handler); - }