[openwrt/openwrt] dns320l-mcu: fix compilation with GCC14
LEDE Commits
lede-commits at lists.infradead.org
Sat May 3 13:59:27 PDT 2025
wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/faef19c22c4f891ac4cc830c64d5505181e506aa
commit faef19c22c4f891ac4cc830c64d5505181e506aa
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Sat May 3 20:51:18 2025 +0000
dns320l-mcu: fix compilation with GCC14
Bump version to fix compiling with GCC14.
This fixes the following compile problem:
```
dns320l-daemon.c: In function 'main':
dns320l-daemon.c:740:18: error: implicit declaration of function 'isprint' [-Wimplicit-function-declaration]
740 | else if (isprint (optopt))
| ^~~~~~~
dns320l-daemon.c:50:1: note: include '<ctype.h>' or provide a declaration of 'isprint'
49 | #include "dns320l-daemon.h"
+++ |+#include <ctype.h>
50 |
dns320l-daemon.c:799:5: error: implicit declaration of function 'umask' [-Wimplicit-function-declaration]
799 | umask(0);
| ^~~~~
dns320l-daemon.c:864:5: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
864 | return;
| ^~~~~~
dns320l-daemon.c:691:5: note: declared here
691 | int main(int argc, char *argv[])
| ^~~~
```
Link: https://github.com/openwrt/openwrt/pull/18688
Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
package/utils/dns320l-mcu/Makefile | 6 +--
.../dns320l-mcu/patches/010-gcc-14-fixes.patch | 50 ----------------------
2 files changed, 3 insertions(+), 53 deletions(-)
diff --git a/package/utils/dns320l-mcu/Makefile b/package/utils/dns320l-mcu/Makefile
index 042cce7409..018f81109c 100644
--- a/package/utils/dns320l-mcu/Makefile
+++ b/package/utils/dns320l-mcu/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/wigyori/dns320l-daemon.git
-PKG_SOURCE_DATE:=2024-10-27
-PKG_SOURCE_VERSION:=d9a2878a525f61fe9070a9f03eb67e5113a69a4f
-PKG_MIRROR_HASH:=5f769253d63f8da1cc0cefd86159bafb4e4f8a54c26a0cbf254ee4d1c53f79bf
+PKG_SOURCE_DATE:=2025-05-03
+PKG_SOURCE_VERSION:=11fcf3bbc98cc1efc64479ffbea8fb86d91c57c2
+PKG_MIRROR_HASH:=4e16dc098aeb5845b0aa977b6f34b67c549bea83e194bf841c9061fb9385fa5c
PKG_MAINTAINER:=Zoltan HERPAI <wigyori at uid0.hu>
PKG_LICENSE:=GPL-3.0+
diff --git a/package/utils/dns320l-mcu/patches/010-gcc-14-fixes.patch b/package/utils/dns320l-mcu/patches/010-gcc-14-fixes.patch
deleted file mode 100644
index dfda9c3710..0000000000
--- a/package/utils/dns320l-mcu/patches/010-gcc-14-fixes.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-dns320l-mcu: Fix compilation with GCC 14
-
-This fixes the following compile problem:
-```
-dns320l-daemon.c: In function 'main':
-dns320l-daemon.c:740:18: error: implicit declaration of function 'isprint' [-Wimplicit-function-declaration]
- 740 | else if (isprint (optopt))
- | ^~~~~~~
-dns320l-daemon.c:50:1: note: include '<ctype.h>' or provide a declaration of 'isprint'
- 49 | #include "dns320l-daemon.h"
- +++ |+#include <ctype.h>
- 50 |
-dns320l-daemon.c:799:5: error: implicit declaration of function 'umask' [-Wimplicit-function-declaration]
- 799 | umask(0);
- | ^~~~~
-dns320l-daemon.c:864:5: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
- 864 | return;
- | ^~~~~~
-dns320l-daemon.c:691:5: note: declared here
- 691 | int main(int argc, char *argv[])
- | ^~~~
-```
-
---- a/dns320l-daemon.c
-+++ b/dns320l-daemon.c
-@@ -26,6 +26,7 @@
-
- */
-
-+#include <ctype.h>
- #include <errno.h>
- #include <termios.h>
- #include <unistd.h>
-@@ -39,6 +40,7 @@
- #include <sys/ioctl.h>
- #include <sys/types.h>
- #include <sys/time.h>
-+#include <sys/stat.h>
- #include <time.h>
- #include <arpa/inet.h>
- #include <netinet/in.h>
-@@ -861,7 +863,7 @@ int main(int argc, char *argv[])
- if (fd < 0)
- {
- syslog(LOG_ERR, "error %d opening %s: %s", errno, stDaemonConfig.portName, strerror (errno));
-- return;
-+ return EXIT_FAILURE;
- }
-
- set_interface_attribs (fd, B115200, 0); // set speed to 115,200 bps, 8n1 (no parity)
More information about the lede-commits
mailing list