All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/bcusdk: fix build w/ gcc-14
@ 2025-08-12 17:36 Thomas Perale via buildroot
  2025-08-16 20:47 ` Thomas Petazzoni via buildroot
  2025-08-21 19:20 ` Thomas Perale via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Perale via buildroot @ 2025-08-12 17:36 UTC (permalink / raw)
  To: buildroot; +Cc: Kurt Van Dijck

When using gcc-14 the compilation fails with the following error
message:

```
close.c: In function 'EIBClose':
close.c:38:3: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
   38 |   close (con->fd);
      |   ^~~~~
      |   pclose
openlocal.c: In function 'EIBSocketLocal':
openlocal.c:57:7: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
   57 |       close (con->fd);
      |       ^~~~~
      |       pclose
make[6]: *** [Makefile:611: close.lo] Error 1
```

This patch include <unistd.h> to include the declaration of close.

Fixes: https://autobuild.buildroot.org/results/483/483fc4584815507c3798eb972e22e51f70f52c23/build-end.log
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
---
 ...include-unistd-for-close-declaration.patch | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644 package/bcusdk/0005-include-unistd-for-close-declaration.patch

diff --git a/package/bcusdk/0005-include-unistd-for-close-declaration.patch b/package/bcusdk/0005-include-unistd-for-close-declaration.patch
new file mode 100644
index 0000000000..c05a68d9a3
--- /dev/null
+++ b/package/bcusdk/0005-include-unistd-for-close-declaration.patch
@@ -0,0 +1,70 @@
+From 7fe256a6e3b28e3ca5c163e38844c9e7c05099c1 Mon Sep 17 00:00:00 2001
+From: Thomas Perale <thomas.perale@mind.be>
+Date: Tue, 12 Aug 2025 18:43:26 +0200
+Subject: [PATCH] include unistd for close declaration
+
+When using gcc-14 the compilation fails with the following error
+message:
+
+```
+close.c: In function 'EIBClose':
+close.c:38:3: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
+   38 |   close (con->fd);
+      |   ^~~~~
+      |   pclose
+openlocal.c: In function 'EIBSocketLocal':
+openlocal.c:57:7: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
+   57 |       close (con->fd);
+      |       ^~~~~
+      |       pclose
+make[6]: *** [Makefile:611: close.lo] Error 1
+```
+
+This patch include <unistd.h> to include the declaration of close.
+
+Upstream: https://sourceforge.net/p/bcusdk/patches/6/
+Signed-off-by: Thomas Perale <thomas.perale@mind.be>
+---
+ eibd/client/c/close.c      | 1 +
+ eibd/client/c/openlocal.c  | 1 +
+ eibd/client/c/openremote.c | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/eibd/client/c/close.c b/eibd/client/c/close.c
+index 900fcd8..f7508bb 100644
+--- a/eibd/client/c/close.c
++++ b/eibd/client/c/close.c
+@@ -24,6 +24,7 @@
+     along with this program; if not, write to the Free Software
+     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
++#include <unistd.h>
+ 
+ #include "eibclient-int.h"
+ 
+diff --git a/eibd/client/c/openlocal.c b/eibd/client/c/openlocal.c
+index c7fd5d7..df2e9f9 100644
+--- a/eibd/client/c/openlocal.c
++++ b/eibd/client/c/openlocal.c
+@@ -27,6 +27,7 @@
+ 
+ #include <sys/socket.h>
+ #include <sys/un.h>
++#include <unistd.h>
+ 
+ #include "eibclient-int.h"
+ 
+diff --git a/eibd/client/c/openremote.c b/eibd/client/c/openremote.c
+index 24d7ecd..9b2be39 100644
+--- a/eibd/client/c/openremote.c
++++ b/eibd/client/c/openremote.c
+@@ -30,6 +30,7 @@
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+ #include <netdb.h>
++#include <unistd.h>
+ 
+ #include "eibclient-int.h"
+ 
+-- 
+2.50.1
-- 
2.50.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-21 19:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 17:36 [Buildroot] [PATCH] package/bcusdk: fix build w/ gcc-14 Thomas Perale via buildroot
2025-08-16 20:47 ` Thomas Petazzoni via buildroot
2025-08-21 19:20 ` Thomas Perale via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.