mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-07-19 15:29:08 +02:00
linux-atm: Fix build with gcc-15
* taken from:
1d1c3f884d/patches/901-linux-atm-dont-use-bool-keyword.patch
* fixes:
http://errors.yoctoproject.org/Errors/Details/852979/
In file included from load_lex.l:11:
../../../linux-atm-2.5.2/src/lane/load_lex.h:27:10: error: two or more data types in declaration specifiers
27 | Bool_t bool;
| ^~~~
../../../linux-atm-2.5.2/src/lane/load_lex.h:27:14: warning: declaration does not declare anything
27 | Bool_t bool;
| ^
In file included from ../../../linux-atm-2.5.2/src/lane/load.c:29:
../../../linux-atm-2.5.2/src/lane/load_lex.h:27:10: error: two or more data types in declaration specifiers
27 | Bool_t bool;
| ^~~~
../../../linux-atm-2.5.2/src/lane/load_lex.h:27:14: warning: declaration does not declare anything
27 | Bool_t bool;
| ^
load_lex.l: In function 'yylex':
load_lex.l:47:11: error: expected identifier before 'bool'
load_lex.l:51:11: error: expected identifier before 'bool'
../../../linux-atm-2.5.2/src/lane/load.c: In function 'load_vars':
../../../linux-atm-2.5.2/src/lane/load.c:501:29: error: expected identifier before 'bool'
501 | g_return.bool==BL_TRUE?"True":"False");
| ^~~~
../../../linux-atm-2.5.2/src/lane/load.c:502:51: error: expected identifier before 'bool'
502 | set_var_bool(curr_unit, varname, g_return.bool);
| ^~~~
make[3]: *** [Makefile:513: load.o] Error 1
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
1de4086b38
commit
f7eeca8807
|
@ -0,0 +1,44 @@
|
||||||
|
From 1435d613ee632bd7a2aa15180acf06ff3723da41 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Jansa <martin.jansa@gmail.com>
|
||||||
|
Date: Sat, 26 Apr 2025 13:03:35 +0200
|
||||||
|
Subject: [PATCH] Fix implicit-declaration error
|
||||||
|
|
||||||
|
* taken from:
|
||||||
|
https://github.com/sbwml/package_network_utils_linux-atm/blob/main/patches/900-fix-implicit-declaration-error.patch
|
||||||
|
|
||||||
|
* fixes:
|
||||||
|
http://errors.yoctoproject.org/Errors/Details/766901/
|
||||||
|
linux-atm-2.5.2/src/led/conn.c:414:57: error: passing argument 3 of 'accept' from incompatible pointer type [-Wincompatible-pointer-types]
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate [Upstream is dead]
|
||||||
|
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
|
||||||
|
---
|
||||||
|
src/led/conn.c | 2 +-
|
||||||
|
src/maint/hediag.c | 1 +
|
||||||
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/led/conn.c b/src/led/conn.c
|
||||||
|
index 99da5e4..89639e1 100644
|
||||||
|
--- a/src/led/conn.c
|
||||||
|
+++ b/src/led/conn.c
|
||||||
|
@@ -405,7 +405,7 @@ Conn_t *accept_conn(Conn_t *conn)
|
||||||
|
{
|
||||||
|
Conn_t *new;
|
||||||
|
struct sockaddr_atmsvc addr;
|
||||||
|
- size_t len;
|
||||||
|
+ socklen_t len;
|
||||||
|
int fd;
|
||||||
|
char buff[MAX_ATM_ADDR_LEN+1];
|
||||||
|
|
||||||
|
diff --git a/src/maint/hediag.c b/src/maint/hediag.c
|
||||||
|
index a4f792f..3b1b7fb 100644
|
||||||
|
--- a/src/maint/hediag.c
|
||||||
|
+++ b/src/maint/hediag.c
|
||||||
|
@@ -9,6 +9,7 @@
|
||||||
|
#include <linux/atmdev.h>
|
||||||
|
#include <linux/sonet.h>
|
||||||
|
#include <linux/atm_he.h>
|
||||||
|
+#include <string.h>
|
||||||
|
|
||||||
|
struct reg_table {
|
||||||
|
unsigned addr;
|
|
@ -0,0 +1,91 @@
|
||||||
|
From 2a9d42b2b190d533cf126a93bcad842cea825bbe Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Jansa <martin.jansa@gmail.com>
|
||||||
|
Date: Sat, 26 Apr 2025 13:04:56 +0200
|
||||||
|
Subject: [PATCH] Fix build with gcc-15
|
||||||
|
|
||||||
|
* taken from:
|
||||||
|
https://github.com/sbwml/package_network_utils_linux-atm/blob/1d1c3f884daf9ee4bce077f3db9d990617683669/patches/901-linux-atm-dont-use-bool-keyword.patch
|
||||||
|
|
||||||
|
* fixes:
|
||||||
|
http://errors.yoctoproject.org/Errors/Details/852979/
|
||||||
|
|
||||||
|
In file included from load_lex.l:11:
|
||||||
|
../../../linux-atm-2.5.2/src/lane/load_lex.h:27:10: error: two or more data types in declaration specifiers
|
||||||
|
27 | Bool_t bool;
|
||||||
|
| ^~~~
|
||||||
|
../../../linux-atm-2.5.2/src/lane/load_lex.h:27:14: warning: declaration does not declare anything
|
||||||
|
27 | Bool_t bool;
|
||||||
|
| ^
|
||||||
|
In file included from ../../../linux-atm-2.5.2/src/lane/load.c:29:
|
||||||
|
../../../linux-atm-2.5.2/src/lane/load_lex.h:27:10: error: two or more data types in declaration specifiers
|
||||||
|
27 | Bool_t bool;
|
||||||
|
| ^~~~
|
||||||
|
../../../linux-atm-2.5.2/src/lane/load_lex.h:27:14: warning: declaration does not declare anything
|
||||||
|
27 | Bool_t bool;
|
||||||
|
| ^
|
||||||
|
load_lex.l: In function 'yylex':
|
||||||
|
load_lex.l:47:11: error: expected identifier before 'bool'
|
||||||
|
load_lex.l:51:11: error: expected identifier before 'bool'
|
||||||
|
../../../linux-atm-2.5.2/src/lane/load.c: In function 'load_vars':
|
||||||
|
../../../linux-atm-2.5.2/src/lane/load.c:501:29: error: expected identifier before 'bool'
|
||||||
|
501 | g_return.bool==BL_TRUE?"True":"False");
|
||||||
|
| ^~~~
|
||||||
|
../../../linux-atm-2.5.2/src/lane/load.c:502:51: error: expected identifier before 'bool'
|
||||||
|
502 | set_var_bool(curr_unit, varname, g_return.bool);
|
||||||
|
| ^~~~
|
||||||
|
make[3]: *** [Makefile:513: load.o] Error 1
|
||||||
|
|
||||||
|
Upstream-Status: Inappropriate [Upstream is dead]
|
||||||
|
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
|
||||||
|
---
|
||||||
|
src/lane/load.c | 4 ++--
|
||||||
|
src/lane/load_lex.h | 2 +-
|
||||||
|
src/lane/load_lex.l | 4 ++--
|
||||||
|
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lane/load.c b/src/lane/load.c
|
||||||
|
index 39d4672..1cc2202 100644
|
||||||
|
--- a/src/lane/load.c
|
||||||
|
+++ b/src/lane/load.c
|
||||||
|
@@ -498,8 +498,8 @@ load_vars(const char *file)
|
||||||
|
break;
|
||||||
|
case BOOLEAN:
|
||||||
|
Debug_unit(&load_unit, "Variable is boolean: %s",
|
||||||
|
- g_return.bool==BL_TRUE?"True":"False");
|
||||||
|
- set_var_bool(curr_unit, varname, g_return.bool);
|
||||||
|
+ g_return.b==BL_TRUE?"True":"False");
|
||||||
|
+ set_var_bool(curr_unit, varname, g_return.b);
|
||||||
|
break;
|
||||||
|
case INTEGER:
|
||||||
|
Debug_unit(&load_unit, "Variable is integer: %d", g_return.intti);
|
||||||
|
diff --git a/src/lane/load_lex.h b/src/lane/load_lex.h
|
||||||
|
index 2384e70..72b8f9b 100644
|
||||||
|
--- a/src/lane/load_lex.h
|
||||||
|
+++ b/src/lane/load_lex.h
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
#define END 0
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
- Bool_t bool;
|
||||||
|
+ Bool_t b;
|
||||||
|
int intti;
|
||||||
|
AtmAddr_t *atmaddress;
|
||||||
|
LaneDestination_t *destaddr;
|
||||||
|
diff --git a/src/lane/load_lex.l b/src/lane/load_lex.l
|
||||||
|
index c184795..1d412e3 100644
|
||||||
|
--- a/src/lane/load_lex.l
|
||||||
|
+++ b/src/lane/load_lex.l
|
||||||
|
@@ -44,11 +44,11 @@ H [0-9a-fA-F]
|
||||||
|
return ATMADDRESS;
|
||||||
|
}
|
||||||
|
True |
|
||||||
|
-true {g_return.bool = BL_TRUE;
|
||||||
|
+true {g_return.b = BL_TRUE;
|
||||||
|
return BOOLEAN;
|
||||||
|
}
|
||||||
|
False |
|
||||||
|
-false {g_return.bool = BL_FALSE;
|
||||||
|
+false {g_return.b = BL_FALSE;
|
||||||
|
return BOOLEAN;
|
||||||
|
}
|
||||||
|
\#.* {}
|
|
@ -16,6 +16,8 @@ SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${P
|
||||||
file://0001-make-Add-PREFIX-knob.patch \
|
file://0001-make-Add-PREFIX-knob.patch \
|
||||||
file://0001-include-string-h-from-memcpy-and-strcpy-function-pro.patch \
|
file://0001-include-string-h-from-memcpy-and-strcpy-function-pro.patch \
|
||||||
file://0001-configure-Check-for-symbol-from-libresolv-instead-of.patch \
|
file://0001-configure-Check-for-symbol-from-libresolv-instead-of.patch \
|
||||||
|
file://0001-Fix-implicit-declaration-error.patch \
|
||||||
|
file://0002-Fix-build-with-gcc-15.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI:append:libc-musl = " file://musl-no-on_exit.patch"
|
SRC_URI:append:libc-musl = " file://musl-no-on_exit.patch"
|
||||||
|
@ -32,7 +34,3 @@ inherit autotools pkgconfig
|
||||||
EXTRA_OEMAKE += "ROOTPREFIX=${root_prefix}"
|
EXTRA_OEMAKE += "ROOTPREFIX=${root_prefix}"
|
||||||
|
|
||||||
FILES:${PN} += "${nonarch_base_libdir}/firmware"
|
FILES:${PN} += "${nonarch_base_libdir}/firmware"
|
||||||
|
|
||||||
# http://errors.yoctoproject.org/Errors/Details/766901/
|
|
||||||
# linux-atm-2.5.2/src/led/conn.c:414:57: error: passing argument 3 of 'accept' from incompatible pointer type [-Wincompatible-pointer-types]
|
|
||||||
CFLAGS += "-Wno-error=incompatible-pointer-types"
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user