From e2a4247c3a62e02c9709b4f6bf62fae1f9f8c1e0 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Fri, 10 Jul 2026 17:25:46 -0400 Subject: Update FCGI FFI for newer Guile --- src/fcgi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/fcgi.c b/src/fcgi.c index 1ff8293..1f4cbb2 100644 --- a/src/fcgi.c +++ b/src/fcgi.c @@ -16,7 +16,7 @@ * You should have received a copy of the GNU Affero General Public * License along with Weeb. If not, see . */ -// gcc $(pkg-config --cflags guile-3.0) -shared -o gfcgi.so -lfcgi -fPIC fcgi.c +// gcc $(pkg-config --cflags guile-3.0) -fPIC -shared -o gfcgi.so $(pkg-config --libs guile-3.0) -lfcgi src/fcgi.c #include "libguile/foreign.h" #include "libguile/gc.h" @@ -64,9 +64,11 @@ SCM FCGI_fread_wrapper(void) { } } - SCM result = scm_from_pointer(buffer, NULL); - result = scm_pointer_to_bytevector(result, SCM_BOOL_F, SCM_BOOL_F, scm_from_int32(size)); - return result; + SCM result = scm_from_pointer(buffer, NULL); + SCM length = scm_from_size_t(size); + SCM offset = scm_from_size_t(0); + SCM u8_type = scm_from_utf8_symbol("u8"); + return scm_pointer_to_bytevector(result, length, offset, u8_type); } void init_libfcgi(void) { -- cgit v1.3