* update linux-atm to 2.5.2-9

This commit is contained in:
Alexander Baldeck 2024-07-19 17:43:06 +02:00
parent 5976cc181d
commit 354d99f1a5
4 changed files with 86 additions and 8 deletions

View File

@ -4,24 +4,30 @@
pkgname=linux-atm
pkgver=2.5.2
pkgrel=8
pkgrel=9
pkgdesc="Drivers and tools to support ATM networking under Linux."
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
depends=('glibc')
optdepends=('flex: for atmsigd')
url="http://linux-atm.sourceforge.net/"
license=(GPL)
license=(GPL-2.0-only)
source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz
linux-atm-man-pages.patch
linux-atm-remove-define-hacks.patch
linux-atm-linux-5.2-SIOCGSTAMP.patch
linux-atm-string-formatting.patch)
linux-atm-2.5.2-linux-headers-5.19.patch
linux-atm-2.5.2-headers.patch
linux-atm-string-formatting.patch
linux-atm-use_socklen_t.patch)
options=(!makeflags)
sha256sums=('9645481a2b16476b59220aa2d6bc5bc41043f291326c9b37581018fbd16dd53a'
'0e535ace1a88d4bba95a586f9357a6fef5258e07ffeba209d630e32149dfaa07'
'd894e81b77dfe376bc9d917799e397be7e2fc28bc8ef657ee3fadccbf7e66c76'
'df2ed44ec81576f014a75a0d7029fab7366a65b21a4beed0c18812b7886aa202'
'8cac3c3703b80606b537611865a37e83b271295a34e563a2c62c5644b75bdd0f')
b2sums=('329aad437a1e6a17fd7d7d2b81c976a76c684aaf127006ed3af1e998a0f52df056747cc84fc13c933dc15c07246f1f00e4ff101ac98ef1dd1bea102830a83625'
'eb7dca42e6729a3f6ba15ee353d6054e9487ff04791fe03dbd5c29c8e3edf7d4909d450ee7ac99e20c78568977bc6e2300078c1e353dfe14fe9eabc58a54775b'
'bcc3d953dbf03902733414bc03a432f6ae25383874358ba37a21586e986a5c26a11a3b54a80be7403a77d3b1ae46a2eab8ba644a1f2dd4b97374fcf7adcdaf9a'
'26fb42c7c49a56cdb238d22ab65096e7db684550f0f27c208262a2b2b73f790aa3bf4cea65bab176317c444deaf58a4a717e8a83cdb5d2f59474aa6cec814a23'
'8187606a2dee1345e23a1083b8718a0d0a650f0f9d032a81a8bb42b988b7eefd821bb54b6681dbcd49bc4633fc59e2c7afd78d31e3610d0ded3e839c6997da26'
'1a1280f70c9232ddc39b664e1a533258c6bf7a05017f471544d442b69a9f9b73775d914b1433359adbcc571218207ec7413e2a64e67432489a8b417251b32e3d'
'726b221428457374e97f77425f56df488f93ad4a3a0aab229a19113d3d06419621de994d713eab872ff86de0c44ef47043aaab0728c06b5734c2d68887eeafd3'
'0f514916bc2115f8ad5995f993b79aebb2cf1e464723eb6ea13e9434b7d2a61ec75b4239e04a3311aeebc6d3a2573fdd69635edf22bc9cd149042023f92001db')
prepare() {
cd "${pkgname}-${pkgver}"
@ -29,6 +35,11 @@ prepare() {
patch -Np1 -i ../linux-atm-remove-define-hacks.patch
patch -Np1 -i ../linux-atm-linux-5.2-SIOCGSTAMP.patch
patch -Np1 -i ../linux-atm-string-formatting.patch
# gentoo patches
patch -Np1 -i ../linux-atm-2.5.2-linux-headers-5.19.patch
patch -Np1 -i ../linux-atm-2.5.2-headers.patch
# fedora patch
patch -Np1 -i ../linux-atm-use_socklen_t.patch
# install firmware in /usr/lib
sed -i "s#/lib/firmware#/usr/lib/firmware#" src/extra/Makefile.in

View File

@ -0,0 +1,30 @@
--- linux-atm/src/maint/hediag.c.orig
+++ linux-atm/src/maint/hediag.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
--- linux-atm/src/qgen/ql_y.y
+++ linux-atm/src/qgen/ql_y.y
@@ -17,6 +17,8 @@
static STRUCTURE *structures = NULL;
static const char *abort_id; /* indicates abort flag */
+void yyerror(const char *s);
+int yylex ( void );
static NAME_LIST *get_name_list(const char *name)
{
--- linux-atm/src/test/ispl_y.y
+++ linux-atm/src/test/ispl_y.y
@@ -16,6 +16,7 @@
static struct atmsvc_msg msg;
+int yylex ( void );
%}

View File

@ -0,0 +1,24 @@
linux/atm_zatm.h was removed in >=linux-headers-5.19. As the hardware is
said to be unlikely working on modern systems, just disable its utility
program to keep the rest building.
See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=052e1f01bfae8be6
--- a/src/maint/Makefile.am
+++ b/src/maint/Makefile.am
@@ -1,5 +1,5 @@
BOOTPGMS=atmaddr esi
-SYSPGMS=atmloop atmtcp enitune zntune hediag # nstune
+SYSPGMS=atmloop atmtcp enitune hediag # nstune zntune
USRPGMS=atmdiag atmdump sonetdiag saaldump
INCLUDES=-I$(srcdir)/../q2931 -I$(srcdir)/../saal -I.
@@ -14,7 +14,7 @@ esi_SOURCES = esi.c
atmloop_SOURCES = atmloop.c
atmtcp_SOURCES = atmtcp.c
enitune_SOURCES = enitune.c
-zntune_SOURCES = zntune.c
+#zntune_SOURCES = zntune.c
#nstune_SOURCES = nstune.c
atmdiag_SOURCES = atmdiag.c

View File

@ -0,0 +1,13 @@
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];