From 24a5cc6b43eb5463e414549c6aeb3a8b53ec8497 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Mon, 27 Jul 2026 10:40:24 +0000 Subject: [PATCH 1/2] build: avoid glibc-only byteswap.h for the COLR version swap byteswap.h and bswap_16() are glibc extensions, not available on BSD/Darwin libc. Replace the single 16-bit swap with a portable shift-based expression. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01U6fuL1PtRJHhr97gAGyS1h --- fcft.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fcft.c b/fcft.c index 98f7323..4cea2d4 100644 --- a/subprojects/fcft/fcft.c +++ b/subprojects/fcft/fcft.c @@ -1,7 +1,6 @@ #include "fcft/fcft.h" #include -#include #include #include #include @@ -685,7 +684,7 @@ instantiate_pattern(FcPattern *pattern, double req_pt_size, double req_px_size, } #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - version = bswap_16(version); + version = (uint16_t)((version << 8) | (version >> 8)); #endif LOG_DBG("%s: COLR: version=%d", version);