From: Pino Toscano Date: Tue, 10 Dec 2024 05:26:52 +0000 (+0100) Subject: Make the quickjs embedded copy build on GNU/Hurd X-Git-Tag: archive/raspbian/2.6.1-1+rpi1^2^2^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f91e2d2c7b648d4cfe9573ba3748655bc29b5bc9;p=qbs.git 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 --- 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 */