Description: Fix FTBFS with GCC 15 (C23): compile extension with -std=gnu17
 patricia.h defines the callback type as `typedef void (*void_fn_t)();`.
 Under C23 (GCC 15 default) an empty parameter list means "no parameters",
 while the callbacks are invoked with both one (func(node->data)) and two
 (func(node->prefix, node->data)) arguments, producing
 "too many arguments to function" errors.  Adding -std=gnu17 to the
 extension CFLAGS keeps the pre-C23 semantics of the empty parameter list.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: other
Forwarded: not-needed
Last-Update: 2026-09-05

--- ruby-rpatricia-1.0.1.orig/ext/rpatricia/extconf.rb
+++ ruby-rpatricia-1.0.1/ext/rpatricia/extconf.rb
@@ -1,6 +1,12 @@
 #!/usr/bin/env ruby 
 require "mkmf"
 
+# GCC 15 defaults to C23, where an empty parameter list () means "no
+# parameters", breaking patricia.h's `typedef void (*void_fn_t)();`
+# callback type (called with both 1 and 2 arguments). Keep the
+# pre-C23 semantics for this K&R-era code.
+$CFLAGS << " -std=gnu17"
+
 have_func("ruby_xcalloc")
 have_func("rb_str_set_len", "ruby.h")
 create_makefile("rpatricia")
