From patchwork Fri Dec 20 13:18:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3719 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 75FD83F1CD for ; Fri, 20 Dec 2024 14:18:55 +0100 (CET) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5d3fe991854sf1852472a12.0 for ; Fri, 20 Dec 2024 05:18:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734700735; cv=pass; d=google.com; s=arc-20240605; b=RZPgMm5u8UbtKE4wRPRGqfkpb9+jliqhlvFj8MIjVJrI4MrOdQbeHgfx3QyrtUzvwy BEQhsnx00yVlOwGQwK5FjXt+L4mJqvSbuuvr7Yqf4PL3lqyb9nISboPNQoQ+qqGwNXBo 4OAASlxwFUFRmcjFo9WBq//vRjkgEpvLfqeq+A50JKZheqJxLzlOImjCK9DYwXW+y4RN QkXsrHyVeBcDBrnA7AKf+OKz5B3yztoqBxIat6fvWgl7MSATqWXmZQnY5dY7GVzh4asM AKFI/s4gu0aeJlaVn/uEwy5XdlL6ITdSgv+x37+yYIKwnrThX7KUAK0VC2+EThyBm+9D uRBg== 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=qXgTSNTAGnKNLOulIA8fCTzK35OYs8uuJJN5DY3Zh3w=; fh=WHjcahVHz/+1KiJi3In+YFyNxgl8/FOcO454GZwvj7Q=; b=U67m24qivujkzZPFUkCetBjshJL2p/rY1dW27sxqUB+vjJ3QL25yrpKAKW30w2wj57 D6NOiPHrCvODW6n3zKyRYmF+lNBKbbGSvEg4pEqtHFgLSgtC0EaBJ55U2+NM14JfwMi9 Hpc9u1DFxBL9Wec/cXXdYB5NCfUkee3W02f/8VWFgQAJngbYvYJ/L7y79GKUWiyFd42C ykCK3hzF8kXhT6Vuu0pMv2lsioZcggKdJoMrUycBPsXPmcHdxlLE6PiMLYozNKTHkc+V rprZPkWFmGIJljGV0Txf+fYSaZSAdyEb8sbu7EbFvQbxyXT1uG5+oUhNvyRf0sQu0PqD 6b1g==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qXC48v+c; 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=1734700735; x=1735305535; 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=qXgTSNTAGnKNLOulIA8fCTzK35OYs8uuJJN5DY3Zh3w=; b=WpTWQ8e014elzX2u8LHCoj3umhPRHCDxdCvLge++WU07IaHs/95oN411DRFxOs2jqo EeOi9J0NcLmx0KKV9G507kF4DDMu0epOfXRohc5mHFcNPyBrI5Loko5uqTotMMmO/8jb bwf2cv+lfkrO2+c1UAQCkNWq4m5bz8VMZsR/s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734700735; x=1735305535; 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=qXgTSNTAGnKNLOulIA8fCTzK35OYs8uuJJN5DY3Zh3w=; b=u21DwBpBegfrF+IX0t8oskY1JVRGlAerERY4g+XYK0sbawPqiXYB6qDTY7jUsIixUp ByVOWNAnmH11Er0Wi6BiGHgWAi++NwaWwWUVDKVFgihPEyrUzhCBn9t+/aNdQMBFHCbT IqC9TXzyk6+2QS4+tiWxcNRIiTmKjcMth2xr4OygUgNUpf5+ItckHV4Sh9+4+qSJc7+x GtLAwxQexy5zmuH4xeSS8sTdf5T3LR66AvRzDGGR4WT4F61MFy7oOIbDKVTD5vSXTvUY D+Sau/shSuEvlDa+F58rFpfCBsvruE6ZE/8qSxyrupdPcHBUYQENBCybHDW8ahO6syTi SWxw== X-Forwarded-Encrypted: i=2; AJvYcCWQyi1W6EMfBlHZBgoQi0g7euwuEzGkYQUJNxmcQ2iOfFR8o6JmMtNcaKVBz6q+HaDPZzqr63QKSZ2DQGkz@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yz/CmLqNKg8pTzmZlmjTS0+U4X/elMTJ/T3drNCdkB4rhXfkANF Cngi/uwIXUuYWil6Dy7ngdtrY1kdQY4yhJ42Tt/Hexn40FVWQDadTSokY2OY0ZBiZA== X-Google-Smtp-Source: AGHT+IH1EDbDhjuufAfDKPsqxbybQU/2dw0GZ11bK2qbWPc6kgGAFslmFCEXJ1RCrKya3xxCrBJ3NA== X-Received: by 2002:a05:6402:448c:b0:5d0:e63e:21ca with SMTP id 4fb4d7f45d1cf-5d81ddd54ffmr1983770a12.19.1734700734693; Fri, 20 Dec 2024 05:18:54 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:9fe1:0:b0:5d3:c489:129 with SMTP id 4fb4d7f45d1cf-5d8025b3269ls21617a12.1.-pod-prod-01-eu; Fri, 20 Dec 2024 05:18:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW3xNFhioJj3ZKZy5z+aHCd1o++IwleqXR0KSzDmC+Du/K8wphP2UqaRMp7wrF2ABHObZWJYHgTan5PNa9Y@amarulasolutions.com X-Received: by 2002:a17:907:3f13:b0:aa6:993a:259f with SMTP id a640c23a62f3a-aac3355e9edmr240740766b.40.1734700732741; Fri, 20 Dec 2024 05:18:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734700732; cv=none; d=google.com; s=arc-20240605; b=f58XGLXRRC+6XpX30XXKGef8I/B5HWlg4X0xBxO1pDtuAKK+ml7+knxTjwvIJNH6U6 UEP99p/bNFW3ilp1hY30mbKgyTdQ0bySIUYMgT6NlIeOMc25eASlpoKhLSZV+N5Saqfn DfK8EtFcLm1RCHSBmpCCtXMV+20DemCL8bv5IsS5fhz2ztFr3YOF7me5NkFY2DXlWgwn 3MmohnGLTgrmolEGP3iWdLBwrgp2erguE5MwFhoqojrBoGw8eAG40beFSUFTH538f91D MB6H3YDHPsmaVzB0D3S0bXmI11lOL0kAV8f1uTxtcz1gOjMT5udNEN5e4TCPjI+tHK0k AU2A== 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=dO3vEe0VSWjKIkVsMxmaXujX4Nb4+Ms/Z482sj8+6lY=; fh=KUA4D1IQ9IrEg07pUjLCSDyJTNJWnYGGU06Skv+ZAMs=; b=ZdvrhrzPWSBMMSZUFFrZmwpliWyI0PhSwxFZ2KrvwJqlt7PHDtNJdiyh57kdKtc55j 8mkr7I8BeMo1wPZarrTqDvm2z7VxouQOXstvzEUWy+GWlr6DqeP9M1wpvI2AzmQUf9/1 NJjvlkpmh/Q6yiPU4w6pwr29pjfGAUphGIZduJ0u3eXimhJK6ITZ8IUZgAyi1G5rSwIH fdVKE6JLZdupQqxB/V77X9AsqVFtQ+nrMbmT3AMWA6ZHJWdRJzY2faBdJU15Uhp9+k4k J2Sycsjb1HxPuwGe/ZyNuY5deQAv+cYxP1RfTEwPMrdE6OtO5HN3Syp5Je8xm97YskcY +Nbg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qXC48v+c; 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-aac0e83e7acsor179947966b.2.2024.12.20.05.18.52 for (Google Transport Security); Fri, 20 Dec 2024 05:18:52 -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; AJvYcCVWnk0qKjDZ5HUMrQig/fWPBJvlEzBCabF/Yvu5IyIrYMv2q4fF68FZbAxI4YKjWtwKnGkUDuA7W2Fdsbpe@amarulasolutions.com X-Gm-Gg: ASbGncsojDpMJt+LDtPrC0RM51H2gSAFPLSKf5wK53LMXnMupv5bXGtzJyLrbP9rW0J vfSX5auN4UtgR+LN5t5m5G26A271ua3p5ByaivFaMB+i3pU+ddtA01ewRrOO1sP7J8rPKNHVLyD lv76MEJKRh6kkbEBSJeJBrKruBU+eIPBCzOoZaehs5VP0KKzsd3TAmsbeb/ExVtD94k4PFwRwpi bXJc4iGVKWT4cjIrD4D6CVWys2Cwd7jofiQ/j/o0rke9x/9JT+x2QIchr1pQuyAblTYh/bvW99i oOZtEDUnDYnSX7WxNn2jDxH1G0BjE7n47XtdBQACwHXOsw== X-Received: by 2002:a05:6402:350d:b0:5d0:e90c:dd61 with SMTP id 4fb4d7f45d1cf-5d81de1640fmr2125356a12.21.1734700732209; Fri, 20 Dec 2024 05:18:52 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.87]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d80679f11dsm1716721a12.46.2024.12.20.05.18.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 05:18:51 -0800 (PST) From: Dario Binacchi To: buildroot@buildroot.org Cc: Pierre-Jean Texier , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [PATCH v2] package/libxml2: fix compilation with uclibc Date: Fri, 20 Dec 2024 14:18:47 +0100 Message-ID: <20241220131847.3380466-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=qXC48v+c; 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 --- Changes v1 -> v2: - Update the patch to the merged one .../0001-Fix-compilation-with-uclibc.patch | 114 ++++++++++++++++++ 1 file changed, 114 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..857f6ca2a2a1 --- /dev/null +++ b/package/libxml2/0001-Fix-compilation-with-uclibc.patch @@ -0,0 +1,114 @@ +From fc72e0833a4e5724aef604e2fd9adb1014cb4844 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 | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/encoding.c b/encoding.c +index 14ffafddbc02..41ecde1885e4 100644 +--- a/encoding.c ++++ b/encoding.c +@@ -1264,7 +1264,7 @@ DECLARE_ISO_FUNCS(16) + #endif /* LIBXML_ISO8859X_ENABLED */ + + #ifdef LIBXML_ICONV_ENABLED +- #define EMPTY_ICONV , (iconv_t) 0, (iconv_t) 0 ++ #define EMPTY_ICONV , (iconv_t) -1, (iconv_t) -1 + #else + #define EMPTY_ICONV + #endif +@@ -1389,8 +1389,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) -1; ++ handler->iconv_out = (iconv_t) -1; + #endif + #ifdef LIBXML_ICU_ENABLED + handler->uconv_in = NULL; +@@ -2200,7 +2200,7 @@ xmlEncInputChunk(xmlCharEncodingHandler *handler, unsigned char *out, + } + } + #ifdef LIBXML_ICONV_ENABLED +- else if (handler->iconv_in != NULL) { ++ else if (handler->iconv_in != (iconv_t) -1) { + ret = xmlIconvWrapper(handler->iconv_in, out, outlen, in, inlen); + } + #endif /* LIBXML_ICONV_ENABLED */ +@@ -2260,7 +2260,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out, + } + } + #ifdef LIBXML_ICONV_ENABLED +- else if (handler->iconv_out != NULL) { ++ else if (handler->iconv_out != (iconv_t) -1) { + ret = xmlIconvWrapper(handler->iconv_out, out, outlen, in, inlen); + } + #endif /* LIBXML_ICONV_ENABLED */ +@@ -2672,17 +2672,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) -1) || (handler->iconv_in != (iconv_t) -1)) { + tofree = 1; +- if (handler->iconv_out != NULL) { ++ if (handler->iconv_out != (iconv_t) -1) { + if (iconv_close(handler->iconv_out)) + ret = -1; +- handler->iconv_out = NULL; ++ handler->iconv_out = (iconv_t) -1; + } +- if (handler->iconv_in != NULL) { ++ if (handler->iconv_in != (iconv_t) -1) { + if (iconv_close(handler->iconv_in)) + ret = -1; +- handler->iconv_in = NULL; ++ handler->iconv_in = (iconv_t) -1; + } + } + #endif /* LIBXML_ICONV_ENABLED */ +-- +2.43.0 +