From: Rany Hany Date: Mon, 13 May 2024 13:34:22 +0000 (+0300) Subject: linux-atm: fix build with GCC 14 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3e024022c3370e94b7002ddd183ac9a622ab89d2;p=openwrt%2Fstaging%2Fneocturne.git linux-atm: fix build with GCC 14 Basic changes to make linux-atm build without any issues with GCC 14. Besides some errors caused by -Wpointer-sign, there was also an issue with socklen_t not being used for getsockopt() and accept() sometimes. I also updated the Debian patch to include the latest changes from version "1:2.5.1-5.1" in Debian Sid. This allowed me to drop "600-fix-format-errors.patch" and "700-include_sockios.patch". Signed-off-by: Rany Hany --- diff --git a/package/network/utils/linux-atm/Makefile b/package/network/utils/linux-atm/Makefile index 43f4b6556b..c48309da9c 100644 --- a/package/network/utils/linux-atm/Makefile +++ b/package/network/utils/linux-atm/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=linux-atm PKG_VERSION:=2.5.2 -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) diff --git a/package/network/utils/linux-atm/patches/000-debian_16.patch b/package/network/utils/linux-atm/patches/000-debian_16.patch deleted file mode 100644 index 4abaac07e8..0000000000 --- a/package/network/utils/linux-atm/patches/000-debian_16.patch +++ /dev/null @@ -1,270 +0,0 @@ ---- a/src/arpd/io.c -+++ b/src/arpd/io.c -@@ -277,7 +277,8 @@ static void accept_new(void) - struct atm_qos qos; - ENTRY *entry; - VCC *vcc; -- int fd,len,size,error; -+ int fd,error; -+ socklen_t len,size; - - len = sizeof(addr); - if ((fd = accept(incoming,(struct sockaddr *) &addr,&len)) < 0) { -@@ -614,7 +615,8 @@ int ip_itf_info(int number,uint32_t *ip, - - int get_local(int fd,struct sockaddr_atmsvc *addr) - { -- int length,result; -+ int result; -+ size_t length; - - length = sizeof(struct sockaddr_atmsvc); - result = getsockname(fd,(struct sockaddr *) addr,&length); ---- a/src/arpd/table.c -+++ b/src/arpd/table.c -@@ -101,7 +101,8 @@ static void dump_vcc(VCC *vcc) - char addr_buf[MAX_ATM_ADDR_LEN+1]; - char qos_buf[MAX_ATM_QOS_LEN+1]; - struct atm_qos qos; -- int size,sndbuf; -+ int sndbuf; -+ socklen_t size; - - size = sizeof(addr); - if (getpeername(vcc->fd,(struct sockaddr *) &addr,&size) < 0) { ---- a/src/ilmid/asn1/asn_int.c -+++ b/src/ilmid/asn1/asn_int.c -@@ -185,7 +185,7 @@ FILE* f _AND_ - AsnInt* v _AND_ - unsigned short int indent) - { -- fprintf(f,"%d", *v); -+ fprintf(f,"%ld", *v); - } - - -@@ -370,5 +370,5 @@ FILE* f _AND_ - UAsnInt* v _AND_ - unsigned short int indent) - { -- fprintf(f,"%u", *v); -+ fprintf(f,"%lu", *v); - } ---- a/src/ilmid/asn1/asn_oid.c -+++ b/src/ilmid/asn1/asn_oid.c -@@ -127,7 +127,7 @@ unsigned short int indent) - if (firstArcNum > 2) - firstArcNum = 2; - -- fprintf(f,"%u %u", firstArcNum, arcNum - (firstArcNum * 40)); -+ fprintf(f,"%d %lu", firstArcNum, arcNum - (firstArcNum * 40)); - - for (; i < v->octetLen ; ) - { -@@ -136,7 +136,7 @@ unsigned short int indent) - - arcNum = (arcNum << 7) + (v->octs[i] & 0x7f); - i++; -- fprintf(f," %u", arcNum); -+ fprintf(f," %lu", arcNum); - } - fprintf(f,"}"); - ---- a/src/lane/connect.c -+++ b/src/lane/connect.c -@@ -258,7 +258,8 @@ static int - data_handler(const Event_t *event, void *funcdata) - { - Conn_t *tmp, *newconn; -- int fd, nbytes; -+ int fd; -+ socklen_t nbytes; - static char buffer[BUFSIZE]; - LaneControl_t *ctmp; - struct sockaddr_atmsvc addr; ---- a/src/lane/connect_bus.c -+++ b/src/lane/connect_bus.c -@@ -170,7 +170,8 @@ static int - data_handler(const Event_t *event, void *funcdata) - { - Conn_t *tmp, *newconn; -- int fd, nbytes; -+ int fd; -+ socklen_t nbytes; - static char buffer[BUFSIZE]; - struct sockaddr_atmsvc addr; - ---- a/src/lane/lane_atm.c -+++ b/src/lane/lane_atm.c -@@ -138,7 +138,7 @@ atm_connect_back(const AtmAddr_t *our_ad - struct atm_blli blli; - struct atm_qos qos; - int fd, ret; -- int len = sizeof(address); -+ socklen_t len = sizeof(address); - - fd = socket(PF_ATMSVC, SOCK_DGRAM, 0); - if (fd <0) { ---- a/src/lane/lecs.c -+++ b/src/lane/lecs.c -@@ -119,7 +119,7 @@ int main(int argc, char **argv) - int just_dump=0; - fd_set fds; - struct sockaddr_atmsvc client; -- int len; -+ socklen_t len; - unsigned char buffer[P_SIZE]; - - while(i!=-1) { ---- a/src/lib/ans.c -+++ b/src/lib/ans.c -@@ -41,7 +41,7 @@ - static int ans(const char *text,int wanted,void *result,int res_len) - { - unsigned char answer[MAX_ANSWER]; -- unsigned char name[MAX_NAME]; -+ char name[MAX_NAME]; - unsigned char *pos,*data,*found; - int answer_len,name_len,data_len,found_len; - int questions,answers; ---- a/src/lib/sdu2cell.c -+++ b/src/lib/sdu2cell.c -@@ -15,7 +15,8 @@ int sdu2cell(int s,int sizes,const int * - { - struct atm_qos qos; - int trailer,total,cells; -- int size,i; -+ int i; -+ socklen_t size; - - size = sizeof(qos); - if (getsockopt(s,SOL_AAL,SO_ATMQOS,&qos,&size) < 0) return -1; ---- a/src/lib/unix.c -+++ b/src/lib/unix.c -@@ -63,8 +63,8 @@ int un_attach(const char *path) - int un_recv_connect(int s,void *buf,int size) - { - struct sockaddr_un addr; -- int addr_size; - int len; -+ socklen_t addr_size; - - addr_size = sizeof(addr); - len = recvfrom(s,buf,size,0,(struct sockaddr *) &addr,&addr_size); ---- a/src/maint/atmtcp.c -+++ b/src/maint/atmtcp.c -@@ -817,7 +817,8 @@ int main(int argc,char **argv) - } - else if (!strcmp(ARG,"listen") || - (do_background = !strcmp(ARG,"listen-bg"))) { -- int fd,port,addr_len; -+ int fd,port; -+ socklen_t addr_len; - int *fd2 = alloc_t(int); - - if ((fd = socket(PF_INET,SOCK_STREAM,0)) < 0) { ---- a/src/maint/hediag.c -+++ b/src/maint/hediag.c -@@ -1,6 +1,7 @@ - #include - #include - #include -+#include - #include - #include - #include ---- a/src/mpoad/io.c -+++ b/src/mpoad/io.c -@@ -521,7 +521,8 @@ static int msg_from_mps(int slot) - static int accept_conn(int slot) - { - struct sockaddr_atmsvc sa; -- int i, new_fd, sa_len; -+ int i, new_fd; -+ socklen_t sa_len; - - sa_len = sizeof(sa); - new_fd = accept(fds[slot].fd, (struct sockaddr *)&sa, &sa_len); ---- a/src/sigd/io.c -+++ b/src/sigd/io.c -@@ -355,7 +355,7 @@ int get_pvc(int itf,int *vci) - error = 0; - if (bind(s,(struct sockaddr *) &addr,sizeof(addr)) < 0) error = errno; - else { -- int size; -+ socklen_t size; - - size = sizeof(addr); - if (getsockname(s,(struct sockaddr *) &addr,&size) < 0) ---- a/src/test/ttcp.c -+++ b/src/test/ttcp.c -@@ -92,7 +92,8 @@ struct sockaddr_in frominet; - struct sockaddr_atmsvc satm; - struct atm_qos qos; - --int domain, fromlen; -+int domain; -+socklen_t fromlen; - int fd; /* fd of network socket */ - - int buflen = 8 * 1024; /* length of buffer */ -@@ -466,7 +467,7 @@ int no_check = 0; - - { - struct sockaddr_atmsvc peer; -- int peerlen = sizeof(peer); -+ socklen_t peerlen = sizeof(peer); - if (getpeername(fd, (struct sockaddr *) &peer, - &peerlen) < 0) { - err("getpeername"); -@@ -498,7 +499,7 @@ int no_check = 0; - /* set socket buffer size */ - #if defined(SO_SNDBUF) || defined(SO_RCVBUF) - if (sockbufsize) { -- int len; -+ socklen_t len; - - if (trans) { - /* set send socket buffer if we are transmitting */ ---- a/src/mpoad/mpcd.8 -+++ b/src/mpoad/mpcd.8 -@@ -28,7 +28,7 @@ mpcd \- ATM MPOA (Multi\-Protocol Over A - .B ]] - .SH DESCRIPTION - MPOA client --.SM(MPC) is responsible for creating and receiving -+.SM (MPC) is responsible for creating and receiving - internetwork layer shortcuts. Using these shortcuts MPCs forward - unicast internetwork layer packets effectively over ATM without need - for routing protocols. -@@ -43,7 +43,7 @@ accepts shortcuts and packets arriving o - shortcuts is done with the help of - .SM MPOA - server --.SM(MPS). -+.SM (MPS). - .PP - Just as the Linux - .SM LAN ---- a/src/led/zeppelin.8 -+++ b/src/led/zeppelin.8 -@@ -99,7 +99,7 @@ Ring and ATM parts of the ELAN, so using - recommended. Token Ring support has received less testing than its - Ethernet counterpart. - .SH FILES --.IP \fI/var/run/lec[interface number].pid\fP -+.IP \fI/var/run/lec[interface\ number].pid\fP - The file containing the process id of zeppelin. - .SH BUGS - John Bonham died 1980 and Led Zeppelin broke. ---- a/src/sigd/atmsigd.conf.4 -+++ b/src/sigd/atmsigd.conf.4 -@@ -125,7 +125,7 @@ a comment. The `#' character cannot be e - .P - If an option is specified in \fBatmsigd.conf\fP and on the command - line, the command line has priority. --.COMPATIBILITY -+.SH COMPATIBILITY - Certain options used by past versions of \fBatmsigd\fP but no longer documented - on the man page are still recognized and supported, but they also yield a - warning message. Future versions of \fBatmsigd\fP will not recognize those diff --git a/package/network/utils/linux-atm/patches/000-debian_2.5.1-5.1.patch b/package/network/utils/linux-atm/patches/000-debian_2.5.1-5.1.patch new file mode 100644 index 0000000000..27bf6b1ad1 --- /dev/null +++ b/package/network/utils/linux-atm/patches/000-debian_2.5.1-5.1.patch @@ -0,0 +1,319 @@ +--- a/src/mpoad/mpcd.8 ++++ b/src/mpoad/mpcd.8 +@@ -28,7 +28,7 @@ mpcd \- ATM MPOA (Multi\-Protocol Over A + .B ]] + .SH DESCRIPTION + MPOA client +-.SM(MPC) is responsible for creating and receiving ++.SM (MPC) is responsible for creating and receiving + internetwork layer shortcuts. Using these shortcuts MPCs forward + unicast internetwork layer packets effectively over ATM without need + for routing protocols. +@@ -43,7 +43,7 @@ accepts shortcuts and packets arriving o + shortcuts is done with the help of + .SM MPOA + server +-.SM(MPS). ++.SM (MPS). + .PP + Just as the Linux + .SM LAN +--- a/src/led/zeppelin.8 ++++ b/src/led/zeppelin.8 +@@ -99,7 +99,7 @@ Ring and ATM parts of the ELAN, so using + recommended. Token Ring support has received less testing than its + Ethernet counterpart. + .SH FILES +-.IP \fI/var/run/lec[interface number].pid\fP ++.IP \fI/var/run/lec[interface\ number].pid\fP + The file containing the process id of zeppelin. + .SH BUGS + John Bonham died 1980 and Led Zeppelin broke. +--- a/src/sigd/atmsigd.conf.4 ++++ b/src/sigd/atmsigd.conf.4 +@@ -125,7 +125,7 @@ a comment. The `#' character cannot be e + .P + If an option is specified in \fBatmsigd.conf\fP and on the command + line, the command line has priority. +-.COMPATIBILITY ++.SH COMPATIBILITY + Certain options used by past versions of \fBatmsigd\fP but no longer documented + on the man page are still recognized and supported, but they also yield a + warning message. Future versions of \fBatmsigd\fP will not recognize those +--- a/src/arpd/io.c ++++ b/src/arpd/io.c +@@ -277,7 +277,8 @@ static void accept_new(void) + struct atm_qos qos; + ENTRY *entry; + VCC *vcc; +- int fd,len,size,error; ++ int fd,error; ++ socklen_t len,size; + + len = sizeof(addr); + if ((fd = accept(incoming,(struct sockaddr *) &addr,&len)) < 0) { +@@ -614,7 +615,8 @@ int ip_itf_info(int number,uint32_t *ip, + + int get_local(int fd,struct sockaddr_atmsvc *addr) + { +- int length,result; ++ int result; ++ size_t length; + + length = sizeof(struct sockaddr_atmsvc); + result = getsockname(fd,(struct sockaddr *) addr,&length); +--- a/src/arpd/table.c ++++ b/src/arpd/table.c +@@ -101,7 +101,8 @@ static void dump_vcc(VCC *vcc) + char addr_buf[MAX_ATM_ADDR_LEN+1]; + char qos_buf[MAX_ATM_QOS_LEN+1]; + struct atm_qos qos; +- int size,sndbuf; ++ int sndbuf; ++ socklen_t size; + + size = sizeof(addr); + if (getpeername(vcc->fd,(struct sockaddr *) &addr,&size) < 0) { +--- a/src/ilmid/asn1/asn_int.c ++++ b/src/ilmid/asn1/asn_int.c +@@ -185,7 +185,7 @@ FILE* f _AND_ + AsnInt* v _AND_ + unsigned short int indent) + { +- fprintf(f,"%d", *v); ++ fprintf(f,"%ld", *v); + } + + +@@ -370,5 +370,5 @@ FILE* f _AND_ + UAsnInt* v _AND_ + unsigned short int indent) + { +- fprintf(f,"%u", *v); ++ fprintf(f,"%lu", *v); + } +--- a/src/ilmid/asn1/asn_oid.c ++++ b/src/ilmid/asn1/asn_oid.c +@@ -127,7 +127,7 @@ unsigned short int indent) + if (firstArcNum > 2) + firstArcNum = 2; + +- fprintf(f,"%u %u", firstArcNum, arcNum - (firstArcNum * 40)); ++ fprintf(f,"%d %lu", firstArcNum, arcNum - (firstArcNum * 40)); + + for (; i < v->octetLen ; ) + { +@@ -136,7 +136,7 @@ unsigned short int indent) + + arcNum = (arcNum << 7) + (v->octs[i] & 0x7f); + i++; +- fprintf(f," %u", arcNum); ++ fprintf(f," %lu", arcNum); + } + fprintf(f,"}"); + +--- a/src/lane/connect.c ++++ b/src/lane/connect.c +@@ -258,7 +258,8 @@ static int + data_handler(const Event_t *event, void *funcdata) + { + Conn_t *tmp, *newconn; +- int fd, nbytes; ++ int fd; ++ socklen_t nbytes; + static char buffer[BUFSIZE]; + LaneControl_t *ctmp; + struct sockaddr_atmsvc addr; +--- a/src/lane/connect_bus.c ++++ b/src/lane/connect_bus.c +@@ -170,7 +170,8 @@ static int + data_handler(const Event_t *event, void *funcdata) + { + Conn_t *tmp, *newconn; +- int fd, nbytes; ++ int fd; ++ socklen_t nbytes; + static char buffer[BUFSIZE]; + struct sockaddr_atmsvc addr; + +--- a/src/lane/lane_atm.c ++++ b/src/lane/lane_atm.c +@@ -138,7 +138,7 @@ atm_connect_back(const AtmAddr_t *our_ad + struct atm_blli blli; + struct atm_qos qos; + int fd, ret; +- int len = sizeof(address); ++ socklen_t len = sizeof(address); + + fd = socket(PF_ATMSVC, SOCK_DGRAM, 0); + if (fd <0) { +--- a/src/lane/lecs.c ++++ b/src/lane/lecs.c +@@ -119,7 +119,7 @@ int main(int argc, char **argv) + int just_dump=0; + fd_set fds; + struct sockaddr_atmsvc client; +- int len; ++ socklen_t len; + unsigned char buffer[P_SIZE]; + + while(i!=-1) { +--- a/src/lib/ans.c ++++ b/src/lib/ans.c +@@ -41,7 +41,7 @@ + static int ans(const char *text,int wanted,void *result,int res_len) + { + unsigned char answer[MAX_ANSWER]; +- unsigned char name[MAX_NAME]; ++ char name[MAX_NAME]; + unsigned char *pos,*data,*found; + int answer_len,name_len,data_len,found_len; + int questions,answers; +--- a/src/lib/sdu2cell.c ++++ b/src/lib/sdu2cell.c +@@ -15,7 +15,8 @@ int sdu2cell(int s,int sizes,const int * + { + struct atm_qos qos; + int trailer,total,cells; +- int size,i; ++ int i; ++ socklen_t size; + + size = sizeof(qos); + if (getsockopt(s,SOL_AAL,SO_ATMQOS,&qos,&size) < 0) return -1; +--- a/src/lib/unix.c ++++ b/src/lib/unix.c +@@ -63,8 +63,8 @@ int un_attach(const char *path) + int un_recv_connect(int s,void *buf,int size) + { + struct sockaddr_un addr; +- int addr_size; + int len; ++ socklen_t addr_size; + + addr_size = sizeof(addr); + len = recvfrom(s,buf,size,0,(struct sockaddr *) &addr,&addr_size); +--- a/src/maint/atmtcp.c ++++ b/src/maint/atmtcp.c +@@ -817,7 +817,8 @@ int main(int argc,char **argv) + } + else if (!strcmp(ARG,"listen") || + (do_background = !strcmp(ARG,"listen-bg"))) { +- int fd,port,addr_len; ++ int fd,port; ++ socklen_t addr_len; + int *fd2 = alloc_t(int); + + if ((fd = socket(PF_INET,SOCK_STREAM,0)) < 0) { +--- a/src/maint/hediag.c ++++ b/src/maint/hediag.c +@@ -1,6 +1,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/src/mpoad/io.c ++++ b/src/mpoad/io.c +@@ -521,7 +521,8 @@ static int msg_from_mps(int slot) + static int accept_conn(int slot) + { + struct sockaddr_atmsvc sa; +- int i, new_fd, sa_len; ++ int i, new_fd; ++ socklen_t sa_len; + + sa_len = sizeof(sa); + new_fd = accept(fds[slot].fd, (struct sockaddr *)&sa, &sa_len); +--- a/src/sigd/io.c ++++ b/src/sigd/io.c +@@ -355,7 +355,7 @@ int get_pvc(int itf,int *vci) + error = 0; + if (bind(s,(struct sockaddr *) &addr,sizeof(addr)) < 0) error = errno; + else { +- int size; ++ socklen_t size; + + size = sizeof(addr); + if (getsockname(s,(struct sockaddr *) &addr,&size) < 0) +--- a/src/test/ttcp.c ++++ b/src/test/ttcp.c +@@ -92,7 +92,8 @@ struct sockaddr_in frominet; + struct sockaddr_atmsvc satm; + struct atm_qos qos; + +-int domain, fromlen; ++int domain; ++socklen_t fromlen; + int fd; /* fd of network socket */ + + int buflen = 8 * 1024; /* length of buffer */ +@@ -466,7 +467,7 @@ int no_check = 0; + + { + struct sockaddr_atmsvc peer; +- int peerlen = sizeof(peer); ++ socklen_t peerlen = sizeof(peer); + if (getpeername(fd, (struct sockaddr *) &peer, + &peerlen) < 0) { + err("getpeername"); +@@ -498,7 +499,7 @@ int no_check = 0; + /* set socket buffer size */ + #if defined(SO_SNDBUF) || defined(SO_RCVBUF) + if (sockbufsize) { +- int len; ++ socklen_t len; + + if (trans) { + /* set send socket buffer if we are transmitting */ +@@ -663,7 +664,7 @@ int no_check = 0; + exit(0); + + usage: +- fprintf(stderr, Usage); ++ fprintf(stderr, "%s", Usage); + exit(1); + } + +--- a/src/arpd/arp.c ++++ b/src/arpd/arp.c +@@ -17,6 +17,7 @@ + #include /* for ntohs, etc. */ + #define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */ + #include ++#include + #include + #include + #include +--- a/src/arpd/itf.c ++++ b/src/arpd/itf.c +@@ -14,6 +14,7 @@ + #include + #define _LINUX_NETDEVICE_H /* glibc2 */ + #include ++#include + #include + + #include "atmd.h" +--- a/src/maint/atmdump.c ++++ b/src/maint/atmdump.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include /* for htonl and ntohl */ + #include + +--- a/src/maint/saaldump.c ++++ b/src/maint/saaldump.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + + #include "pdu.h" diff --git a/package/network/utils/linux-atm/patches/510-remove-LINUX_NETDEVICE-hack.patch b/package/network/utils/linux-atm/patches/510-remove-LINUX_NETDEVICE-hack.patch index d76ec1eaf4..c16df18aa9 100644 --- a/package/network/utils/linux-atm/patches/510-remove-LINUX_NETDEVICE-hack.patch +++ b/package/network/utils/linux-atm/patches/510-remove-LINUX_NETDEVICE-hack.patch @@ -28,8 +28,8 @@ in Linux 4.20. #include -#define _LINUX_NETDEVICE_H /* glibc2 */ #include + #include #include - --- a/src/arpd/io.c +++ b/src/arpd/io.c @@ -21,7 +21,6 @@ @@ -48,5 +48,5 @@ in Linux 4.20. #include /* for ntohs, etc. */ -#define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */ #include + #include #include - #include diff --git a/package/network/utils/linux-atm/patches/600-fix-format-errors.patch b/package/network/utils/linux-atm/patches/600-fix-format-errors.patch deleted file mode 100644 index ef484f2fa3..0000000000 --- a/package/network/utils/linux-atm/patches/600-fix-format-errors.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/test/ttcp.c -+++ b/src/test/ttcp.c -@@ -664,7 +664,7 @@ int no_check = 0; - exit(0); - - usage: -- fprintf(stderr, Usage); -+ fprintf(stderr, "%s", Usage); - exit(1); - } - diff --git a/package/network/utils/linux-atm/patches/600-musl-include.patch b/package/network/utils/linux-atm/patches/600-musl-include.patch new file mode 100644 index 0000000000..2b2268d8ac --- /dev/null +++ b/package/network/utils/linux-atm/patches/600-musl-include.patch @@ -0,0 +1,30 @@ +--- a/src/include/atmd.h ++++ b/src/include/atmd.h +@@ -10,6 +10,7 @@ + + #include + #include ++#include + #include + #include + +--- a/src/lib/unix.c ++++ b/src/lib/unix.c +@@ -8,6 +8,7 @@ + + #include + #include ++#include + #include + #include + #include +--- a/src/sigd/kernel.c ++++ b/src/sigd/kernel.c +@@ -8,6 +8,7 @@ + + #include + #include ++#include + #include + #include + diff --git a/package/network/utils/linux-atm/patches/700-fix-gcc14-build.patch b/package/network/utils/linux-atm/patches/700-fix-gcc14-build.patch new file mode 100644 index 0000000000..a19dc6c767 --- /dev/null +++ b/package/network/utils/linux-atm/patches/700-fix-gcc14-build.patch @@ -0,0 +1,82 @@ +--- a/src/arpd/io.c ++++ b/src/arpd/io.c +@@ -615,7 +615,7 @@ int ip_itf_info(int number,uint32_t *ip, + int get_local(int fd,struct sockaddr_atmsvc *addr) + { + int result; +- size_t length; ++ socklen_t length; + + length = sizeof(struct sockaddr_atmsvc); + result = getsockname(fd,(struct sockaddr *) addr,&length); +--- 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]; + +@@ -538,7 +538,7 @@ static int handle_accept(Conn_t *conn) + */ + static int handle_data(Conn_t *conn) + { +- char buff[MAX_CTRL_FRAME]; ++ unsigned char buff[MAX_CTRL_FRAME]; + int retval; + + retval = recv_frame(conn, buff, sizeof(buff)); +--- a/src/led/frames.c ++++ b/src/led/frames.c +@@ -312,7 +312,7 @@ static void handle_ready_ind(Conn_t *con + * dependant handler functions. + * Returns < 0 for serious error + */ +-int handle_frame(Conn_t *conn, char *buff, int size) ++int handle_frame(Conn_t *conn, unsigned char *buff, int size) + { + struct ctrl_frame *frame; + +--- a/src/led/frames.h ++++ b/src/led/frames.h +@@ -13,7 +13,7 @@ int validate_frame(unsigned char *buff, + void send_ready_ind(Conn_t *conn); + void send_register_req(void); + +-int handle_frame(Conn_t *conn, char *buff, int size); ++int handle_frame(Conn_t *conn, unsigned char *buff, int size); + uint32_t send_flush_req(Conn_t *conn); + + void parse_tlvs(uint16_t opcode, unsigned char *tlvp, int numtlvs, int sizeoftlvs); +--- a/src/led/join.c ++++ b/src/led/join.c +@@ -43,7 +43,7 @@ static int read_join_rsp(char *buff, int + static int parse_join_rsp(unsigned char *buff, int size); + + static int get_bus_addr(struct sockaddr_atmsvc *addr); +-static int read_bus_arp(Conn_t *conn, struct sockaddr_atmsvc *addr, char *buff, int buffsize); ++static int read_bus_arp(Conn_t *conn, struct sockaddr_atmsvc *addr, unsigned char *buff, int buffsize); + + /* + * 5.1, Initial state +@@ -693,7 +693,7 @@ static int get_bus_addr(struct sockaddr_ + fd_set rfds; + struct timeval tv; + int n = 0, retval, timeout; +- char buff[MAX_CTRL_FRAME]; ++ unsigned char buff[MAX_CTRL_FRAME]; + + timeout = 4; /* wait response for 4 seconds */ + lec_params.c7c_current_timeout = 1; +@@ -740,7 +740,7 @@ static int get_bus_addr(struct sockaddr_ + * Tries to read BUS ATM address in *addr + * returns < 0 for error, 0 for not found > 0 for success + */ +-static int read_bus_arp(Conn_t *conn, struct sockaddr_atmsvc *addr, char *buff, int buffsize) ++static int read_bus_arp(Conn_t *conn, struct sockaddr_atmsvc *addr, unsigned char *buff, int buffsize) + { + int frame_size; + struct ctrl_frame *frame; diff --git a/package/network/utils/linux-atm/patches/700-musl-include.patch b/package/network/utils/linux-atm/patches/700-musl-include.patch deleted file mode 100644 index 2b2268d8ac..0000000000 --- a/package/network/utils/linux-atm/patches/700-musl-include.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/src/include/atmd.h -+++ b/src/include/atmd.h -@@ -10,6 +10,7 @@ - - #include - #include -+#include - #include - #include - ---- a/src/lib/unix.c -+++ b/src/lib/unix.c -@@ -8,6 +8,7 @@ - - #include - #include -+#include - #include - #include - #include ---- a/src/sigd/kernel.c -+++ b/src/sigd/kernel.c -@@ -8,6 +8,7 @@ - - #include - #include -+#include - #include - #include - diff --git a/package/network/utils/linux-atm/patches/800-include_sockios.patch b/package/network/utils/linux-atm/patches/800-include_sockios.patch deleted file mode 100644 index edb385ca10..0000000000 --- a/package/network/utils/linux-atm/patches/800-include_sockios.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/src/maint/saaldump.c 2020-03-29 22:58:01.089711789 +0200 -+++ b/src/maint/saaldump.c 2020-03-29 22:59:17.564639387 +0200 -@@ -6,6 +6,7 @@ - #include - #endif - -+#include - #include - #include - #include ---- a/src/maint/atmdump.c 2020-03-29 22:58:18.573694469 +0200 -+++ b/src/maint/atmdump.c 2020-03-29 22:58:49.956729365 +0200 -@@ -6,6 +6,7 @@ - #include - #endif - -+#include - #include - #include - #include -