From patchwork Thu Dec 19 07:32:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3716 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 23FCE3FA09 for ; Thu, 19 Dec 2024 08:32:27 +0100 (CET) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5d40b574fe3sf404206a12.2 for ; Wed, 18 Dec 2024 23:32:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734593547; cv=pass; d=google.com; s=arc-20240605; b=Xp0I59MnLrVHicSxuwqdwiKSln3KUejFDPmpSlJks7kTM5j+rD1qBnhrMmjlLZx/a2 NRIsXjXHsgNvUc4woUc8YEBv0+s1GFAmuijIt3CE3LyZ6+qLy5bnxomByU++O8BtqWLn 0vb56oC0DVtBuARw3JdWoGwlylrN42tsbxwK5KZhNo5Z5/e4Tx/T7iVkv1TPfojcrd0W VItY8M6lPooEI6dULZja/U4Vg0pw4GCOYPUqCmX696tsogIKMLiuhhIeAE2LzIWxadFz IYZMnZSeNC0XP0VpPA9syPvkr5c3XMTqKEl1IDSHP5uVYwKeKWPppF42NgUpu+x06L+V sLTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=TJ+AuZL6Pm4qiTBxYufocOwItMUzIrC46XjUxFsLOgk=; fh=qL8KMI/5HmoLcD8w8QfZ2sXHjZ9EjFOZdbV06RRHACw=; b=UbH7tCMVpvLiLnhLJW6/alImUkscGcDhCoxM0xrxxY89itZn2k7Ew9FvEa7C9B6AG+ IEFKc+I+GTEZVhjk8bEP9uyhnS4fEm/5rXa64Pvvwm2T3DWD+bPtlCBjC78nF335YIMK 9I25lsIfG6ZzfhKotjxju/ZVhNqtE9zjF0LOS8PaTbwgzXDdMr7XsLmhiqxLeF57NkkM ZyQ/GPoW2aXfM+XAseRbAjdeSXu9LUeH7BbBNAEC0546Ek6lQpIfP59hyK9Zt3MyREVW yPwXmfcWQUfnFWY/BIPiP5VL3UDEjPcm8BcBKBgsIxbjdFyoe/9QtLmLDjqaBYc/A847 gTEg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AOi9Qg6a; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1734593547; x=1735198347; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=TJ+AuZL6Pm4qiTBxYufocOwItMUzIrC46XjUxFsLOgk=; b=AO9rC8UiLjZ5zjkals9zSFjixVSaQJ22JriuBUjjvU2XImPybLe3+uX0ISsn8CHmg4 airc+1mP0XOoxXtgvVpQj+4v9oh2CN5HJeLpaXpT7ti9YYftNERYHYtoifg54gId7Nvi YYRqyXLYu/EMRwv0gMjCeWiBfHSlYjMo/2VRE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734593547; x=1735198347; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TJ+AuZL6Pm4qiTBxYufocOwItMUzIrC46XjUxFsLOgk=; b=jKIltKFJC7+lfue5bj+uMlnah1pTcb+KvhJkTrY8TA5oVkiroKnAc96QlvkkgneggJ POlXRvXYUKimj2l6g8CfnVNtTbAmYkGN8PJxvZNxE+1XL/28BNdGdD4nTnYdGuhsr65g pNlFnhNf6Wbe5OAOlASYpqZBRSq0CfW6eTU8+NWCJ8IAtpJo3zZVZMnOTdDH3DVBLGkv QpFJqSS1jLZURalcZn1RAPXr1PJd4+EetFialcH0lKzORKBruKJS2DmDuyB3vE2LuBjy f3lGsu98kEyfD1Wd1RbTMXC3NLs9nwObycBadicSDswb3EqljX2+VL43Z+yhrOANTJ4G 4ghA== X-Forwarded-Encrypted: i=2; AJvYcCVxJsqk1fgHMWjJj2jhxk6rnNVc/9KXKedD5qEgmPEDDUFslAzn9M0npI+F4rMX4QlO6DbxOTtjtkN3dRzR@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yxd333vO9PeS07/j8CzOOBv2LC1lMStpDMUjqokUJp6axocqH8d J/+6M3+009T1jDIGtO64D/ovpqXTWqAiVmv/9BNO0S4SHOLlrHJwZkliu4bey0VG0Q== X-Google-Smtp-Source: AGHT+IGQizK1kxj4UCIoCzh0Duo22FNMicSS/+OGOx296WUsX57jgaqeeyqhciO5ugWOQOYwKGFiTw== X-Received: by 2002:a05:6402:5289:b0:5d2:7270:6135 with SMTP id 4fb4d7f45d1cf-5d7ee41fc09mr4938551a12.33.1734593546365; Wed, 18 Dec 2024 23:32:26 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:931b:0:b0:5d0:bf73:1c41 with SMTP id 4fb4d7f45d1cf-5d8025c9dd8ls16224a12.2.-pod-prod-02-eu; Wed, 18 Dec 2024 23:32:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU2QhwZLnIjJ60FozQ3kQnJeCWGEcglMQ1i2sbSMbvoUk+cowcC/xWUW1Ph6RClPBxbYzRtdric6ZP4WiV+@amarulasolutions.com X-Received: by 2002:a17:906:328d:b0:aa6:1e9a:e45a with SMTP id a640c23a62f3a-aabf48c67c5mr437238166b.46.1734593544503; Wed, 18 Dec 2024 23:32:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734593544; cv=none; d=google.com; s=arc-20240605; b=eI9nwHQTZduJ/aZ91iBBo8xbQn92JQQvW4MBUToc/2e9qjCLKccivQVzS6g1UH5nea BYh9s81afZXuQDW5xRQfNaXhg4rEkMxytvHQVDVXD/UN6Y+BSnQVnBt7nQNA3dzwmQ7e 1TQ8+Iyr12o8Bd05aHLJLnM748tQ51VCi3jTuUBLICdopaAV5j1eqo7ihPZjsRedO2t+ BRb0jWjrDd0Q/cQfhB5mW6X6IzSP+CqGSEkCVdSRcPU6XvrGmdJrpTWld5igRTSFXSCp jz4zfjMS25I14qfXHNkc0xx8ERZqrWBvOJeqo3Sc6uYhViJgz2Fpa2jbQlRNApY0OW/G 22vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=HVI+p02Dh703MJh8Nxs/uZ6bXLypJO9/+2E7QVRvwn4=; fh=4tNqznXLdGg707N95Ha+duhNMm6AXsxYwbIKBB9N/nE=; b=Uow27ZUirbWLvzJeS3bWgax+wgHlIGrylJcda4AqjFxNlXzWpNrYdmqh2XEHktfkUH GijnClS1Ur6IX2WMbkivZZzqnuA9kXpUOM46iJfrbEe5iDxGUE5d/bno1ZRk8bnY1WpP VBN/6HrXDRikJReWiyReOQsAd5PHfFHejy55qwwOAN9sd2zqIahL9F8zcUJC/kjyuxQI +GR/ZZkWpxAYbL+cU9QCrCKdiJOOKG52f48Q56XasxB+WB0FncZH1d12WOtLXIppqk3G PZQoFS6fxI9MuPfFWhEQhKLjA4l3H+YCPZut+wpZDv89pq4/+jZjhlYkSly8Tq8rskaO 8Ozw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AOi9Qg6a; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-aac0f0198c0sor20774366b.18.2024.12.18.23.32.24 for (Google Transport Security); Wed, 18 Dec 2024 23:32:24 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCUSL6UL3anL1ZvCIOR40gIQ4r4RQxhjoBeoq9qPOJCqVsBtu06Dj1p+piv4ws5cIq+WTfWGzzyq8I7yA/cj@amarulasolutions.com X-Gm-Gg: ASbGnctwW+SMmg2LYnZCyYsY9gTwcBkA9l0uOWAdUG9OlNwH8I+OvMs+QDUUDVpgQwh Nx/k7xlrJDLPaHov++mzRlQCQUe4qaXfBqiDI3ICejyHTI5QtAFSJrqB8+G4ChFA07+PUHnBOLV ltcF/9grTvM3vBcmEYbTf0Gl+u+30I5jU9lEGQ4Rjvf1gR4eOpvM3aZhon0HMtSuOz6KxwSHROJ q5l7Mg0psx/Jr6gA0+nxINFdR58Q7bUjkIth5HmqdONOdcj/BokTldBpY5592aIEgbnXyOV45Wv 4stxs2C7rcaMljYtLdQy X-Received: by 2002:a17:906:4c9:b0:aa9:1b4b:489e with SMTP id a640c23a62f3a-aabf4788ea9mr494033666b.24.1734593543846; Wed, 18 Dec 2024 23:32:23 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.41.87]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0efe497dsm34635266b.132.2024.12.18.23.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 23:32:23 -0800 (PST) From: Dario Binacchi To: buildroot@buildroot.org Cc: Pierre-Jean Texier , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [PATCH 1/1] package/libxml2: fix compilation with uclibc Date: Thu, 19 Dec 2024 08:32:13 +0100 Message-ID: <20241219073213.2438379-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AOi9Qg6a; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The patch fixes the following errors and warnings raised by the compilation of the library with uClibc: encoding.c: In function ‘xmlEncInputChunk’: encoding.c:2209:32: warning: comparison between pointer and integer 2209 | else if (handler->iconv_in != NULL) { | ^~ encoding.c: In function ‘xmlEncOutputChunk’: encoding.c:2269:33: warning: comparison between pointer and integer 2269 | else if (handler->iconv_out != NULL) { | ^~ encoding.c: In function ‘xmlCharEncCloseFunc’: encoding.c:2681:29: warning: comparison between pointer and integer 2681 | if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { | ^~ encoding.c:2681:60: warning: comparison between pointer and integer 2681 | if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { | ^~ encoding.c:2683:32: warning: comparison between pointer and integer 2683 | if (handler->iconv_out != NULL) { | ^~ encoding.c:2686:32: error: assignment to ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] 2686 | handler->iconv_out = NULL; | ^ encoding.c:2688:31: warning: comparison between pointer and integer 2688 | if (handler->iconv_in != NULL) { | ^~ encoding.c:2691:31: error: assignment to ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] 2691 | handler->iconv_in = NULL; | ^ make[4]: *** [Makefile:1147: libxml2_la-encoding.lo] Error 1 Signed-off-by: Dario Binacchi --- .../0001-Fix-compilation-with-uclibc.patch | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 package/libxml2/0001-Fix-compilation-with-uclibc.patch diff --git a/package/libxml2/0001-Fix-compilation-with-uclibc.patch b/package/libxml2/0001-Fix-compilation-with-uclibc.patch new file mode 100644 index 000000000000..012866a24fef --- /dev/null +++ b/package/libxml2/0001-Fix-compilation-with-uclibc.patch @@ -0,0 +1,118 @@ +From f4e971e872426563f85b4e2c6a629cecc757fde7 Mon Sep 17 00:00:00 2001 +From: Dario Binacchi +Date: Mon, 16 Dec 2024 17:23:23 +0100 +Subject: [PATCH] Fix compilation with uclibc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The patch fixes the following errors and warnings raised by the +compilation of the library with uClibc: + +encoding.c: In function ‘xmlEncInputChunk’: +encoding.c:2209:32: warning: comparison between pointer and integer + 2209 | else if (handler->iconv_in != NULL) { + | ^~ +encoding.c: In function ‘xmlEncOutputChunk’: +encoding.c:2269:33: warning: comparison between pointer and integer + 2269 | else if (handler->iconv_out != NULL) { + | ^~ +encoding.c: In function ‘xmlCharEncCloseFunc’: +encoding.c:2681:29: warning: comparison between pointer and integer + 2681 | if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { + | ^~ +encoding.c:2681:60: warning: comparison between pointer and integer + 2681 | if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { + | ^~ +encoding.c:2683:32: warning: comparison between pointer and integer + 2683 | if (handler->iconv_out != NULL) { + | ^~ +encoding.c:2686:32: error: assignment to ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] + 2686 | handler->iconv_out = NULL; + | ^ +encoding.c:2688:31: warning: comparison between pointer and integer + 2688 | if (handler->iconv_in != NULL) { + | ^~ +encoding.c:2691:31: error: assignment to ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] + 2691 | handler->iconv_in = NULL; + | ^ +make[4]: *** [Makefile:1147: libxml2_la-encoding.lo] Error 1 + +Signed-off-by: Dario Binacchi +Upstream: https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/292 +--- + encoding.c | 24 +++++++++++++++--------- + 1 file changed, 15 insertions(+), 9 deletions(-) + +diff --git a/encoding.c b/encoding.c +index 14ffafddbc02..30c75b7a99dc 100644 +--- a/encoding.c ++++ b/encoding.c +@@ -44,6 +44,12 @@ + #include "private/enc.h" + #include "private/error.h" + ++#if defined(__GLIBC__) && defined(__UCLIBC__) ++#define ICONV_T_NULL ((iconv_t)-1) ++#else ++#define ICONV_T_NULL NULL ++#endif ++ + #ifdef LIBXML_ICU_ENABLED + #include + /* Size of pivot buffer, same as icu/source/common/ucnv.cpp CHUNK_SIZE */ +@@ -1389,8 +1395,8 @@ xmlNewCharEncodingHandler(const char *name, + handler->name = up; + + #ifdef LIBXML_ICONV_ENABLED +- handler->iconv_in = NULL; +- handler->iconv_out = NULL; ++ handler->iconv_in = ICONV_T_NULL; ++ handler->iconv_out = ICONV_T_NULL; + #endif + #ifdef LIBXML_ICU_ENABLED + handler->uconv_in = NULL; +@@ -2200,7 +2206,7 @@ xmlEncInputChunk(xmlCharEncodingHandler *handler, unsigned char *out, + } + } + #ifdef LIBXML_ICONV_ENABLED +- else if (handler->iconv_in != NULL) { ++ else if (handler->iconv_in != ICONV_T_NULL) { + ret = xmlIconvWrapper(handler->iconv_in, out, outlen, in, inlen); + } + #endif /* LIBXML_ICONV_ENABLED */ +@@ -2260,7 +2266,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out, + } + } + #ifdef LIBXML_ICONV_ENABLED +- else if (handler->iconv_out != NULL) { ++ else if (handler->iconv_out != ICONV_T_NULL) { + ret = xmlIconvWrapper(handler->iconv_out, out, outlen, in, inlen); + } + #endif /* LIBXML_ICONV_ENABLED */ +@@ -2672,17 +2678,17 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) { + * Iconv handlers can be used only once, free the whole block. + * and the associated icon resources. + */ +- if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { ++ if ((handler->iconv_out != ICONV_T_NULL) || (handler->iconv_in != ICONV_T_NULL)) { + tofree = 1; +- if (handler->iconv_out != NULL) { ++ if (handler->iconv_out != ICONV_T_NULL) { + if (iconv_close(handler->iconv_out)) + ret = -1; +- handler->iconv_out = NULL; ++ handler->iconv_out = ICONV_T_NULL; + } +- if (handler->iconv_in != NULL) { ++ if (handler->iconv_in != ICONV_T_NULL) { + if (iconv_close(handler->iconv_in)) + ret = -1; +- handler->iconv_in = NULL; ++ handler->iconv_in = ICONV_T_NULL; + } + } + #endif /* LIBXML_ICONV_ENABLED */ +-- +2.43.0 +