diff options
| author | NHOrus <jy6x2b32pie9@yahoo.com> | 2025-02-20 13:06:24 +0400 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-02-20 13:50:12 +0000 |
| commit | c43b5fb511c078be274b6952fd041189982ea15c (patch) | |
| tree | c4d1210d4a7c5a0b80cd9f929513b29fc7bbc11a /net-dialup/linux-atm/files/linux-atm-2.5.2-fix-booleans.patch | |
| parent | 5ca770b328aaf795f80acc849bddaade61bedbae (diff) | |
| download | gentoo-c43b5fb511c078be274b6952fd041189982ea15c.tar.gz gentoo-c43b5fb511c078be274b6952fd041189982ea15c.tar.bz2 gentoo-c43b5fb511c078be274b6952fd041189982ea15c.zip | |
net-dialup/linux-atm: fix build on musl, C23
As usual, wrong defines, missing includes, need for gnu extensions,
`int` instead of `socklen_t`, `Bool_t bool`, weird fixes for buggy
and outdated system libraries.
Included fixes for formatting in *printf(), partially cherry-picked
from debian patch
https://sources.debian.org/patches/linux-atm/1:2.5.1-7/misc/
Closes: https://bugs.gentoo.org/897842
Closes: https://bugs.gentoo.org/949721
Closes: https://bugs.gentoo.org/712860
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40666
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-dialup/linux-atm/files/linux-atm-2.5.2-fix-booleans.patch')
| -rw-r--r-- | net-dialup/linux-atm/files/linux-atm-2.5.2-fix-booleans.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/net-dialup/linux-atm/files/linux-atm-2.5.2-fix-booleans.patch b/net-dialup/linux-atm/files/linux-atm-2.5.2-fix-booleans.patch new file mode 100644 index 000000000000..3b563cbcdb19 --- /dev/null +++ b/net-dialup/linux-atm/files/linux-atm-2.5.2-fix-booleans.patch @@ -0,0 +1,42 @@ +Correct for building with C23, rename `bool` struct member +https://bugs.gentoo.org/949721 +--- a/src/lane/load.c ++++ b/src/lane/load.c +@@ -498,8 +498,8 @@ + 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.boolval==BL_TRUE?"True":"False"); ++ set_var_bool(curr_unit, varname, g_return.boolval); + break; + case INTEGER: + Debug_unit(&load_unit, "Variable is integer: %d", g_return.intti); +--- 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 boolval; + int intti; + AtmAddr_t *atmaddress; + LaneDestination_t *destaddr; +--- a/src/lane/load_lex.l ++++ b/src/lane/load_lex.l +@@ -44,11 +44,11 @@ + return ATMADDRESS; + } + True | +-true {g_return.bool = BL_TRUE; ++true {g_return.boolval = BL_TRUE; + return BOOLEAN; + } + False | +-false {g_return.bool = BL_FALSE; ++false {g_return.boolval = BL_FALSE; + return BOOLEAN; + } + \#.* {} |
