* [Buildroot] [PATCH] package/swupdate: fix build failure due to missing include
@ 2025-11-25 14:50 Giulio Benetti
2026-02-03 16:16 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Giulio Benetti @ 2025-11-25 14:50 UTC (permalink / raw)
To: buildroot; +Cc: Giulio Benetti
Add local patch upstreamed to fix build failure due to missing unistd.h
include.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
...001-ipc-add-missing-unistd.h-include.patch | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 package/swupdate/0001-ipc-add-missing-unistd.h-include.patch
diff --git a/package/swupdate/0001-ipc-add-missing-unistd.h-include.patch b/package/swupdate/0001-ipc-add-missing-unistd.h-include.patch
new file mode 100644
index 0000000000..58ceab24ea
--- /dev/null
+++ b/package/swupdate/0001-ipc-add-missing-unistd.h-include.patch
@@ -0,0 +1,38 @@
+From 0a936479ef45307cb92f020bbf74808754d07784 Mon Sep 17 00:00:00 2001
+From: AFIQE ANUAR <afiqe.anuar@atmark-techno.com>
+Date: Tue, 7 Jan 2025 11:20:07 +0900
+Subject: [PATCH] ipc: add missing unistd.h include
+
+musl requires unistd.h to be included for close() as specified by POSIX.
+
+This always printed a warning and has become and error since gcc 14:
+
+ipc/network_ipc-if.c: In function 'inst_wait_for_complete':
+ipc/network_ipc-if.c:74:17: error: implicit declaration of function 'close'; did you mean 'clone'? [-Wimplicit-function-declaration]
+ 74 | close(*progressfd);
+ | ^~~~~
+ | clone
+
+Upstream: https://github.com/sbabic/swupdate/commit/0a936479ef45307cb92f020bbf74808754d07784
+Signed-off-by: AFIQE ANUAR <afiqe.anuar@atmark-techno.com>
+Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
+Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
+---
+ ipc/network_ipc-if.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ipc/network_ipc-if.c b/ipc/network_ipc-if.c
+index 51a99357..7740d1dc 100644
+--- a/ipc/network_ipc-if.c
++++ b/ipc/network_ipc-if.c
+@@ -12,6 +12,7 @@
+ #include <signal.h>
+ #include <pthread.h>
+ #include <inttypes.h>
++#include <unistd.h>
+ #include "network_ipc.h"
+ #include "progress_ipc.h"
+
+--
+2.47.3
+
--
2.47.3
_______________________________________________
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] package/swupdate: fix build failure due to missing include
2025-11-25 14:50 [Buildroot] [PATCH] package/swupdate: fix build failure due to missing include Giulio Benetti
@ 2026-02-03 16:16 ` Thomas Petazzoni via buildroot
2026-02-10 16:19 ` Giulio Benetti
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-02-03 16:16 UTC (permalink / raw)
To: Giulio Benetti; +Cc: buildroot
Hello,
On Tue, Nov 25, 2025 at 03:50:24PM +0100, Giulio Benetti wrote:
> Add local patch upstreamed to fix build failure due to missing unistd.h
> include.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
I'm rather confused, because we have been using swupdate 2025.05 in
Buildroot since commit d5826736d5aa63eb818a5d20338b7b698f66dad7, which
was merged in May 2025, and this version already includes <unistd.h>
in network_ipc-if.c.
So I'm rather confused. Also, I couldn't reproduce the issue, building
swupdate with a musl toolchain.
Could you clarify? Also keep in mind that when fixing issues we need
to indicate since when the issue exists so that our dear LTS
maintainers can understand whether the fix needs to be backported or
not.
I'll mark the patch as "Not Applicable", but feel free to send a new
iteration with more details if you find out that the patch is actually
still needed.
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
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] package/swupdate: fix build failure due to missing include
2026-02-03 16:16 ` Thomas Petazzoni via buildroot
@ 2026-02-10 16:19 ` Giulio Benetti
0 siblings, 0 replies; 3+ messages in thread
From: Giulio Benetti @ 2026-02-10 16:19 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
Hello Thomas,
On 2/3/26 17:16, Thomas Petazzoni wrote:
> Hello,
>
> On Tue, Nov 25, 2025 at 03:50:24PM +0100, Giulio Benetti wrote:
>> Add local patch upstreamed to fix build failure due to missing unistd.h
>> include.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>
> I'm rather confused, because we have been using swupdate 2025.05 in
> Buildroot since commit d5826736d5aa63eb818a5d20338b7b698f66dad7, which
> was merged in May 2025, and this version already includes <unistd.h>
> in network_ipc-if.c.
>
> So I'm rather confused. Also, I couldn't reproduce the issue, building
> swupdate with a musl toolchain.
>
> Could you clarify? Also keep in mind that when fixing issues we need
> to indicate since when the issue exists so that our dear LTS
> maintainers can understand whether the fix needs to be backported or
> not.
>
> I'll mark the patch as "Not Applicable", but feel free to send a new
> iteration with more details if you find out that the patch is actually
> still needed.
here is my mistake, I've picked an autobuilder failure [1] without
rebasing and thinking to fix it. That worked using br-reproduce script
and I haven't retried to build using master branch.
Sorry for the noise
Best regards
Giulio
[1]:
https://autobuild.buildroot.net/results/864/8640e0adaed4ec512c62dab73d2b3bb299cb7e9a//
_______________________________________________
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:[~2026-02-10 16:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 14:50 [Buildroot] [PATCH] package/swupdate: fix build failure due to missing include Giulio Benetti
2026-02-03 16:16 ` Thomas Petazzoni via buildroot
2026-02-10 16:19 ` Giulio Benetti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox