Skip to content

Commit cda2394

Browse files
committed
libnfs: upstream patches to build with glibc-2.43
1 parent 13f4546 commit cda2394

3 files changed

Lines changed: 146 additions & 0 deletions

packages/network/libnfs/patches/libnfs-514-socket-use-void-cast-to-allow-compile-for-arm32.patch renamed to packages/network/libnfs/patches/libnfs-0514-socket-use-void-cast-to-allow-compile-for-arm32.patch

File renamed without changes.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From 89a795fee97a3da348c28dbd58500100a13dcec0 Mon Sep 17 00:00:00 2001
2+
From: Rudi Heitbaum <rudi@heitbaum.com>
3+
Date: Sun, 25 Jan 2026 08:30:43 +0000
4+
Subject: [PATCH] Do not edit const and use const qualifier from pointer target
5+
type
6+
7+
Fixes:
8+
../../lib/libnfs.c: In function 'nfs_set_context_args':
9+
../../lib/libnfs.c:301:30: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
10+
301 | char *strp = strchr(val, ',');
11+
| ^~~~~~
12+
---
13+
lib/libnfs.c | 3 +--
14+
1 file changed, 1 insertion(+), 2 deletions(-)
15+
16+
diff --git a/lib/libnfs.c b/lib/libnfs.c
17+
index bbe6666..162492b 100755
18+
--- a/lib/libnfs.c
19+
+++ b/lib/libnfs.c
20+
@@ -316,9 +316,8 @@ nfs_set_context_args(struct nfs_context *nfs, const char *arg, const char *val)
21+
} else if (!strcmp(arg, "wsize")) {
22+
nfs_set_writemax(nfs, atoi(val));
23+
} else if (!strcmp(arg, "readdir-buffer")) {
24+
- char *strp = strchr(val, ',');
25+
+ const char *strp = strchr(val, ',');
26+
if (strp) {
27+
- *strp = 0;
28+
strp++;
29+
nfs_set_readdir_max_buffer_size(nfs, atoi(val), atoi(strp));
30+
} else {
31+
--
32+
2.51.0
33+
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
From 6a06cb6dba0065705179329729cca2f95a842a63 Mon Sep 17 00:00:00 2001
2+
From: Rudi Heitbaum <rudi@heitbaum.com>
3+
Date: Sun, 25 Jan 2026 08:42:18 +0000
4+
Subject: [PATCH] use const qualifier from pointer target type
5+
6+
Fixes:
7+
../../lib/nfs_v3.c: In function 'nfs3_mknod_async':
8+
../../lib/nfs_v3.c:3260:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
9+
3260 | ptr = strrchr(path, '/');
10+
| ^
11+
../../lib/nfs_v3.c: In function 'nfs3_unlink_async':
12+
../../lib/nfs_v3.c:3361:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
13+
3361 | ptr = strrchr(path, '/');
14+
| ^
15+
../../lib/nfs_v3.c: In function 'nfs3_rmdir_async':
16+
../../lib/nfs_v3.c:3472:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
17+
3472 | ptr = strrchr(path, '/');
18+
| ^
19+
../../lib/nfs_v3.c: In function 'nfs3_mkdir2_async':
20+
../../lib/nfs_v3.c:3574:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
21+
3574 | ptr = strrchr(path, '/');
22+
| ^
23+
---
24+
lib/nfs_v3.c | 24 ++++++++++++------------
25+
1 file changed, 12 insertions(+), 12 deletions(-)
26+
27+
diff --git a/lib/nfs_v3.c b/lib/nfs_v3.c
28+
index addd0ae..2c32fff 100644
29+
--- a/lib/nfs_v3.c
30+
+++ b/lib/nfs_v3.c
31+
@@ -3244,7 +3244,7 @@ int
32+
nfs3_mknod_async(struct nfs_context *nfs, const char *path, int mode, int dev,
33+
nfs_cb cb, void *private_data)
34+
{
35+
- char *ptr;
36+
+ const char *ptr;
37+
struct mknod_cb_data *cb_data;
38+
39+
cb_data = malloc(sizeof(struct mknod_cb_data));
40+
@@ -3262,8 +3262,8 @@ nfs3_mknod_async(struct nfs_context *nfs, const char *path, int mode, int dev,
41+
"buffer for mknod path");
42+
return -1;
43+
}
44+
- ptr = strrchr(cb_data->path, '/');
45+
- *ptr = 0;
46+
+ char *ptr2 = strrchr(cb_data->path, '/');
47+
+ *ptr2 = 0;
48+
} else {
49+
cb_data->path = malloc(strlen(path) + 2);
50+
if (cb_data->path == NULL) {
51+
@@ -3353,7 +3353,7 @@ nfs3_unlink_async(struct nfs_context *nfs, const char *path, nfs_cb cb,
52+
void *private_data)
53+
{
54+
char *new_path;
55+
- char *ptr;
56+
+ const char *ptr;
57+
58+
ptr = strrchr(path, '/');
59+
if (ptr) {
60+
@@ -3363,8 +3363,8 @@ nfs3_unlink_async(struct nfs_context *nfs, const char *path, nfs_cb cb,
61+
"buffer for unlink path");
62+
return -1;
63+
}
64+
- ptr = strrchr(new_path, '/');
65+
- *ptr = 0;
66+
+ char *ptr2 = strrchr(new_path, '/');
67+
+ *ptr2 = 0;
68+
} else {
69+
new_path = malloc(strlen(path) + 2);
70+
if (new_path == NULL) {
71+
@@ -3464,7 +3464,7 @@ nfs3_rmdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb,
72+
void *private_data)
73+
{
74+
char *new_path;
75+
- char *ptr;
76+
+ const char *ptr;
77+
78+
ptr = strrchr(path, '/');
79+
if (ptr) {
80+
@@ -3474,8 +3474,8 @@ nfs3_rmdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb,
81+
"buffer for rmdir path");
82+
return -1;
83+
}
84+
- ptr = strrchr(new_path, '/');
85+
- *ptr = 0;
86+
+ char *ptr2 = strrchr(new_path, '/');
87+
+ *ptr2 = 0;
88+
} else {
89+
new_path = malloc(strlen(path) + 2);
90+
if (new_path == NULL) {
91+
@@ -3566,7 +3566,7 @@ nfs3_mkdir2_async(struct nfs_context *nfs, const char *path, int mode,
92+
nfs_cb cb, void *private_data)
93+
{
94+
char *new_path;
95+
- char *ptr;
96+
+ const char *ptr;
97+
98+
ptr = strrchr(path, '/');
99+
if (ptr) {
100+
@@ -3576,8 +3576,8 @@ nfs3_mkdir2_async(struct nfs_context *nfs, const char *path, int mode,
101+
"buffer for mkdir path");
102+
return -1;
103+
}
104+
- ptr = strrchr(new_path, '/');
105+
- *ptr = 0;
106+
+ char *ptr2 = strrchr(new_path, '/');
107+
+ *ptr2 = 0;
108+
} else {
109+
new_path = malloc(strlen(path) + 2);
110+
if (new_path == NULL) {
111+
--
112+
2.51.0
113+

0 commit comments

Comments
 (0)