From 624178a39deac39b576d2f84afebe5d47798ece4 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 21 Apr 2025 08:26:31 +0200 Subject: [PATCH] Make the quickjs embedded copy build on GNU/Hurd Forwarded: not-needed Origin: vendor Last-Update: 2024-12-10 Backport/adapt the changes done in the upstream quickjs project for supporting GNU/Hurd to the embedded copy in qbs: https://github.com/bellard/quickjs/pull/316 This patch can be dropped when qbs rebases its copy to a new version of the upstream quickjs. Gbp-Pq: Name quickjs_hurd.diff --- src/shared/quickjs/quickjs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/quickjs/quickjs.c b/src/shared/quickjs/quickjs.c index 3bafe694..17c03bae 100644 --- a/src/shared/quickjs/quickjs.c +++ b/src/shared/quickjs/quickjs.c @@ -36,7 +36,7 @@ #include #if defined(__APPLE__) #include -#elif defined(__linux__) +#elif defined(__linux__) || defined(__GLIBC__) #include #elif defined(__FreeBSD__) #include @@ -1763,7 +1763,7 @@ static size_t js_def_malloc_usable_size(const void *ptr) return _msize((void *)ptr); #elif defined(EMSCRIPTEN) return 0; -#elif defined(__linux__) +#elif defined(__linux__) || defined(__GLIBC__) return malloc_usable_size((void *)ptr); #else /* change this to `return 0;` if compilation fails */ -- 2.30.2