* [Buildroot] [PATCH 1/1] package/nfs-utils: Fix build with glibc-2.42
@ 2025-07-31 17:28 Bernd Kuhls
2025-07-31 19:19 ` Petr Vorel
0 siblings, 1 reply; 3+ messages in thread
From: Bernd Kuhls @ 2025-07-31 17:28 UTC (permalink / raw)
To: buildroot; +Cc: Giulio Benetti, Petr Vorel
Add upstream patch to fix build with glibc-2.42.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
.../0001-Fix-build-with-glibc-2.42.patch | 59 +++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 package/nfs-utils/0001-Fix-build-with-glibc-2.42.patch
diff --git a/package/nfs-utils/0001-Fix-build-with-glibc-2.42.patch b/package/nfs-utils/0001-Fix-build-with-glibc-2.42.patch
new file mode 100644
index 0000000000..6bf3622586
--- /dev/null
+++ b/package/nfs-utils/0001-Fix-build-with-glibc-2.42.patch
@@ -0,0 +1,59 @@
+From 9f974046c37b7c28705d5558328759fff708b1cb Mon Sep 17 00:00:00 2001
+From: Yaakov Selkowitz <yselkowi@redhat.com>
+Date: Fri, 27 Jun 2025 04:54:08 -0500
+Subject: Fix build with glibc-2.42
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+exportfs.c: In function ‘release_lockfile’:
+exportfs.c:83:17: error: ignoring return value of ‘lockf’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
+ 83 | lockf(_lockfd, F_ULOCK, 0);
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~
+exportfs.c: In function ‘grab_lockfile’:
+exportfs.c:77:17: error: ignoring return value of ‘lockf’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
+ 77 | lockf(_lockfd, F_LOCK, 0);
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~
+
+lockf is now marked with attribute warn_unused_result:
+
+https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f3c82fc1b41261f582f5f9fa12f74af9bcbc88f9
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+
+Upstream: https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=9f974046c37b7c28705d5558328759fff708b1cb
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ utils/exportfs/exportfs.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
+index b03a047b..748c38e3 100644
+--- a/utils/exportfs/exportfs.c
++++ b/utils/exportfs/exportfs.c
+@@ -74,13 +74,19 @@ grab_lockfile(void)
+ {
+ _lockfd = open(lockfile, O_CREAT|O_RDWR, 0666);
+ if (_lockfd != -1)
+- lockf(_lockfd, F_LOCK, 0);
++ if (lockf(_lockfd, F_LOCK, 0) != 0) {
++ xlog_warn("%s: lockf() failed: errno %d (%s)",
++ __func__, errno, strerror(errno));
++ }
+ }
+ static void
+ release_lockfile(void)
+ {
+ if (_lockfd != -1) {
+- lockf(_lockfd, F_ULOCK, 0);
++ if (lockf(_lockfd, F_ULOCK, 0) != 0) {
++ xlog_warn("%s: lockf() failed: errno %d (%s)",
++ __func__, errno, strerror(errno));
++ }
+ close(_lockfd);
+ _lockfd = -1;
+ }
+--
+cgit v1.2.3
+
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/nfs-utils: Fix build with glibc-2.42
2025-07-31 17:28 [Buildroot] [PATCH 1/1] package/nfs-utils: Fix build with glibc-2.42 Bernd Kuhls
@ 2025-07-31 19:19 ` Petr Vorel
2025-08-10 15:25 ` Romain Naour via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2025-07-31 19:19 UTC (permalink / raw)
To: Bernd Kuhls; +Cc: buildroot, Giulio Benetti
Hi Bernd,
> Add upstream patch to fix build with glibc-2.42.
Thank you for backporting this fix!
Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
Kind regards,
Petr
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/nfs-utils: Fix build with glibc-2.42
2025-07-31 19:19 ` Petr Vorel
@ 2025-08-10 15:25 ` Romain Naour via buildroot
0 siblings, 0 replies; 3+ messages in thread
From: Romain Naour via buildroot @ 2025-08-10 15:25 UTC (permalink / raw)
To: Petr Vorel, Bernd Kuhls; +Cc: buildroot, Giulio Benetti
Hello Bernd, Petr, All,
Le 31/07/2025 à 21:19, Petr Vorel a écrit :
> Hi Bernd,
>
>> Add upstream patch to fix build with glibc-2.42.
>
> Thank you for backporting this fix!
>
> Reviewed-by: Petr Vorel <petr.vorel@gmail.com>
Applied to master, thanks.
Note: glibc 2.42 is not yet supported in Buildroot but since nfs-utils provide a
host variant, we need this fix for hosts using latest glibc.
Best regards,
Romain
>
> Kind regards,
> Petr
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-10 15:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 17:28 [Buildroot] [PATCH 1/1] package/nfs-utils: Fix build with glibc-2.42 Bernd Kuhls
2025-07-31 19:19 ` Petr Vorel
2025-08-10 15:25 ` Romain Naour via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox