libcss: vendor patches (no longer exist on server)

Signed-off-by: Lisanna Dettwyler <lisanna.dettwyler@gmail.com>
This commit is contained in:
Lisanna Dettwyler
2026-03-06 13:37:46 -05:00
parent 8651b53717
commit 4fef53dba2
3 changed files with 42 additions and 10 deletions
@@ -0,0 +1,11 @@
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -73,7 +73,7 @@
if (result == NULL)
return CSS_BADPARM;
- s = calloc(sizeof(css_computed_style), 1);
+ s = calloc(1, sizeof(css_computed_style));
if (s == NULL)
return CSS_NOMEM;
@@ -0,0 +1,29 @@
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -138,7 +138,7 @@
{
struct css_node_data *nd;
- nd = calloc(sizeof(struct css_node_data), 1);
+ nd = calloc(1, sizeof(struct css_node_data));
if (nd == NULL) {
return CSS_NOMEM;
}
@@ -234,7 +234,7 @@
if (result == NULL)
return CSS_BADPARM;
- c = calloc(sizeof(css_select_ctx), 1);
+ c = calloc(1, sizeof(css_select_ctx));
if (c == NULL)
return CSS_NOMEM;
@@ -613,7 +613,7 @@
*node_bloom = NULL;
/* Create the node's bloom */
- bloom = calloc(sizeof(css_bloom), CSS_BLOOM_SIZE);
+ bloom = calloc(CSS_BLOOM_SIZE, sizeof(css_bloom));
if (bloom == NULL) {
return CSS_NOMEM;
}
+2 -10
View File
@@ -22,18 +22,10 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
# select: computed: Squash -Wcalloc-transposed-args (gcc-14)
# remove on next release
(fetchpatch {
name = "fix-calloc-transposed-args-computed.patch";
url = "https://source.netsurf-browser.org/libcss.git/patch/?id=0541e18b442d2f46abc0f0b09e0db950e1b657e5";
hash = "sha256-6nrT1S1E+jU6UDr3BZo9GH8jcSiIwTNLnmI1rthhhws=";
})
./fix-calloc-transposed-args-computed.patch
# select: select: Squash -Wcalloc-transposed-args (gcc-14)
# remove on next release
(fetchpatch {
name = "fix-calloc-transposed-args-select.patch";
url = "https://source.netsurf-browser.org/libcss.git/patch/?id=8619d09102d6cc34d63fe87195c548852fc93bf4";
hash = "sha256-Clkhw/n/+NQR/T8Gi+2Lc1Neq5dWsNKM8RqieYuTnzQ=";
})
./fix-calloc-transposed-args-select.patch
];
nativeBuildInputs = [ pkg-config ];