diff options
Diffstat (limited to 'package/network/utils/linux-atm')
6 files changed, 828 insertions, 0 deletions
diff --git a/package/network/utils/linux-atm/Makefile b/package/network/utils/linux-atm/Makefile new file mode 100644 index 0000000000..12f871cf94 --- /dev/null +++ b/package/network/utils/linux-atm/Makefile @@ -0,0 +1,190 @@ +# +# Copyright (C) 2006-2012 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=linux-atm +PKG_VERSION:=2.5.2 +PKG_RELEASE:=5 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=@SF/$(PKG_NAME) +PKG_MD5SUM:=d49499368c3cf15f73a05d9bce8824a8 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +ATM_DEBUG_BINS:=aread awrite atmdiag atmdump atmswitch saaldump \ + sonetdiag svc_recv svc_send ttcp_atm +ATM_DEBUG_SBINS:=atmaddr atmloop atmtcp esi atmsigd bus \ + ilmid ilmidiag lecs les mpcd zeppelin +ATM_DEBUG_TOOLS:=$(ATM_DEBUG_BINS) $(ATM_DEBUG_SBINS) + +define Package/linux-atm + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Linux ATM library + URL:=http://linux-atm.sourceforge.net/ +endef + +define Package/linux-atm/description + This package contains a library for accessing the Linux ATM subsystem. +endef + +define Package/linux-atm/Default + SECTION:=net + CATEGORY:=Network + DEPENDS:=linux-atm + URL:=http://linux-atm.sourceforge.net/ + SUBMENU:=Linux ATM tools +endef + +define Package/atm-tools + $(call Package/linux-atm/Default) + TITLE:=Linux ATM tools +endef + +define Package/atm-tools/description + This package contains the Linux ATM tools. +endef + +define Package/atm-diagnostics + $(call Package/linux-atm/Default) + TITLE:=Linux ATM Diagnostics +endef + +define Package/atm-diagnostics/description + This package contains the Linux ATM diagnostics. +endef + +define Package/atm-debug-tools + $(call Package/linux-atm/Default) + TITLE:=Linux ATM debugging tools +endef + +define Package/atm-debug-tools/description + This package contains the Linux ATM debugging tools. +endef + +define Package/br2684ctl + $(call Package/linux-atm/Default) + TITLE:=ATM Ethernet bridging configuration utility +endef + +define Package/br2684ctl/description + Support for AAL5 encapsulation (RFC-1483/RFC-2684) over ATM. +endef + +define GenAtmPlugin + define Package/$(1) + $(call Package/linux-atm/Default) + TITLE:=Linux ATM tool $(2) + endef + + define Package/$(1)/description + Linux ATM tool $(2). + endef +endef + +$(foreach t,$(ATM_DEBUG_TOOLS),$(eval $(call GenAtmPlugin,atm-$(t),$(t)))) + +define Build/Configure + $(call Build/Configure/Default) + # prevent autoheader invocation + touch $(PKG_BUILD_DIR)/stamp-h.in +endef + +unexport PREFIX + +define Build/Compile + # src/qgen is built with HOSTCC, which does not really like our LDFLAGS + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/src/qgen \ + LDFLAGS="" \ + all + +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) OBJCOPY=$(TARGET_CROSS)objcopy all +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include \ + $(PKG_INSTALL_DIR)/usr/lib \ + $(1)/usr/ +endef + +define Package/linux-atm/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatm.so* $(1)/usr/lib/ +endef + +define Package/atm-tools/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmarp{,d} $(1)/usr/sbin/ +endef + + +define BuildAtmPlugin + define Package/$(1)/install + $(INSTALL_DIR) $$(1)/usr/$(3) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/$(3)/$(2) $$(1)/usr/$(3) + endef + + $$(eval $$(call BuildPackage,$(1))) +endef + +define Package/atm-debug-tools/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmaddr $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmloop $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmtcp $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/esi $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aread $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/awrite $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdiag $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdump $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/atmsigd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/bus $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ilmid $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ilmidiag $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/lecs $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/les $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mpcd $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/zeppelin $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmswitch $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/saaldump $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sonetdiag $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svc_recv $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svc_send $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ttcp_atm $(1)/usr/bin/ +endef + +define Package/atm-diagnostics/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aread $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/awrite $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdiag $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/atmdump $(1)/usr/bin/ +endef + +define Package/br2684ctl/install + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/br2684ctl $(1)/etc/init.d/ + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/br2684ctl $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,linux-atm)) +$(eval $(call BuildPackage,atm-tools)) +$(eval $(call BuildPackage,atm-debug-tools)) +$(eval $(call BuildPackage,atm-diagnostics)) +$(eval $(call BuildPackage,br2684ctl)) +$(foreach t,$(ATM_DEBUG_BINS),$(eval $(call BuildAtmPlugin,atm-$(t),$(t),bin))) +$(foreach t,$(ATM_DEBUG_SBINS),$(eval $(call BuildAtmPlugin,atm-$(t),$(t),sbin))) diff --git a/package/network/utils/linux-atm/files/br2684ctl b/package/network/utils/linux-atm/files/br2684ctl new file mode 100755 index 0000000000..30b1a44e27 --- /dev/null +++ b/package/network/utils/linux-atm/files/br2684ctl @@ -0,0 +1,89 @@ +#!/bin/sh /etc/rc.common + +START=50 + +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 + +start_daemon() { + . /lib/functions/network.sh + + local cfg="$1" + + local atmdev + config_get atmdev "$cfg" atmdev 0 + + local unit + config_get unit "$cfg" unit 0 + + local vpi + config_get vpi "$cfg" vpi 8 + + local vci + config_get vci "$cfg" vci 35 + + local encaps + config_get encaps "$cfg" encaps + + case "$encaps" in + 1|vc) encaps=1;; + *) encaps=0;; + esac + + local payload + config_get payload "$cfg" payload + + case "$payload" in + 0|routed) payload=0;; + *) payload=1;; + esac + + local qos + config_get qos "$cfg" qos + + local sendsize + config_get sendsize "$cfg" sendsize + + local circuit="$atmdev.$vpi.$vci" + + network_defer_device "nas$unit" + + SERVICE_PID_FILE="/var/run/br2684ctl-$circuit.pid" \ + service_start /usr/sbin/br2684ctl \ + -c "$unit" -e "$encaps" -p "$payload" \ + -a "$circuit" ${qos:+-q "$qos"} ${sendsize:+-s "$sendsize"} + sleep 1 + + network_ready_device "nas$unit" +} + +stop_daemon() { + local cfg="$1" + + local atmdev + config_get atmdev "$cfg" atmdev 0 + + local unit + config_get unit "$cfg" unit 0 + + local vpi + config_get vpi "$cfg" vpi 8 + + local vci + config_get vci "$cfg" vci 35 + + local circuit="$atmdev.$vpi.$vci" + + SERVICE_PID_FILE="/var/run/br2684ctl-$circuit.pid" \ + service_stop /usr/sbin/br2684ctl +} + +start() { + config_load network + config_foreach start_daemon atm-bridge +} + +stop() { + config_load network + config_foreach stop_daemon atm-bridge +} diff --git a/package/network/utils/linux-atm/patches/000-debian_16.patch b/package/network/utils/linux-atm/patches/000-debian_16.patch new file mode 100644 index 0000000000..4abaac07e8 --- /dev/null +++ b/package/network/utils/linux-atm/patches/000-debian_16.patch @@ -0,0 +1,270 @@ +--- 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 <stdio.h> + #include <stdlib.h> + #include <unistd.h> ++#include <string.h> + #include <sys/ioctl.h> + #include <sys/types.h> + #include <sys/socket.h> +--- 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/200-no_libfl.patch b/package/network/utils/linux-atm/patches/200-no_libfl.patch new file mode 100644 index 0000000000..6db877931f --- /dev/null +++ b/package/network/utils/linux-atm/patches/200-no_libfl.patch @@ -0,0 +1,179 @@ +--- a/src/qgen/Makefile.am ++++ b/src/qgen/Makefile.am +@@ -2,7 +2,7 @@ noinst_PROGRAMS = qgen + + qgen_SOURCES = common.c common.h file.c file.h first.c ql_y.y ql_l.l qgen.c \ + qgen.h second.c third.c +-qgen_LDADD = -lfl ++qgen_LDADD = + + COMPILE = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@ + LINK = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@ -o $@ +--- a/src/qgen/Makefile.in ++++ b/src/qgen/Makefile.in +@@ -204,7 +204,7 @@ top_srcdir = @top_srcdir@ + qgen_SOURCES = common.c common.h file.c file.h first.c ql_y.y ql_l.l qgen.c \ + qgen.h second.c third.c + +-qgen_LDADD = -lfl ++qgen_LDADD = + COMPILE = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@ + LINK = @CC_FOR_BUILD@ @CFLAGS_FOR_BUILD@ -o $@ + +--- a/src/sigd/Makefile.am ++++ b/src/sigd/Makefile.am +@@ -8,7 +8,7 @@ atmsigd_XTRAS = mess.o $(top_builddir)/s + $(top_builddir)/src/q2931/qd.dump.o \ + $(top_builddir)/src/lib/libatm.la \ + $(top_builddir)/src/saal/libsaal.a +-atmsigd_LDADD = $(atmsigd_XTRAS) -lfl ++atmsigd_LDADD = $(atmsigd_XTRAS) + atmsigd_DEPENDENCIES = mess.c $(atmsigd_XTRAS) + + CLEANFILES = mess.c +--- a/src/sigd/Makefile.in ++++ b/src/sigd/Makefile.in +@@ -245,7 +245,7 @@ atmsigd_XTRAS = mess.o $(top_builddir)/s + $(top_builddir)/src/lib/libatm.la \ + $(top_builddir)/src/saal/libsaal.a + +-atmsigd_LDADD = $(atmsigd_XTRAS) -lfl ++atmsigd_LDADD = $(atmsigd_XTRAS) + atmsigd_DEPENDENCIES = mess.c $(atmsigd_XTRAS) + CLEANFILES = mess.c + sysconf_DATA = atmsigd.conf +--- a/src/switch/debug/debug.c ++++ b/src/switch/debug/debug.c +@@ -20,6 +20,11 @@ + + #define PRV(call) ((FAB *) (call)->fab) + ++int yywrap(void) ++{ ++ return 1; ++} ++ + + typedef struct _fab { + CALL *next; /* relay.c may not keep track of calls, but WE are */ +--- a/src/switch/debug/Makefile.am ++++ b/src/switch/debug/Makefile.am +@@ -5,7 +5,7 @@ INCLUDES = -I$(srcdir)/../../q2931 + sw_debug_SOURCES = debug.c + sw_debug_XTRAS = $(top_builddir)/src/switch/libsw.a \ + $(top_builddir)/src/lib/libatm.la +-sw_debug_LDADD = $(sw_debug_XTRAS) -lfl ++sw_debug_LDADD = $(sw_debug_XTRAS) + + sw_debug_DEPENDENCIES = $(sw_debug_XTRAS) + +--- a/src/switch/debug/Makefile.in ++++ b/src/switch/debug/Makefile.in +@@ -200,7 +200,8 @@ sw_debug_SOURCES = debug.c + sw_debug_XTRAS = $(top_builddir)/src/switch/libsw.a \ + $(top_builddir)/src/lib/libatm.la + +-sw_debug_LDADD = $(sw_debug_XTRAS) -lfl ++sw_debug_LDADD = $(sw_debug_XTRAS) ++ + sw_debug_DEPENDENCIES = $(sw_debug_XTRAS) + EXTRA_DIST = demo README + all: all-am +--- a/src/switch/tcp/Makefile.am ++++ b/src/switch/tcp/Makefile.am +@@ -5,7 +5,7 @@ INCLUDES = -I$(srcdir)/../../q2931 + sw_tcp_SOURCES = tcpsw.c + sw_tcp_XTRAS = $(top_builddir)/src/switch/libsw.a \ + $(top_builddir)/src/lib/libatm.la +-sw_tcp_LDADD = $(sw_tcp_XTRAS) -lfl ++sw_tcp_LDADD = $(sw_tcp_XTRAS) + sw_tcp_DEPENDENCIES = $(sw_tcp_XTRAS) + + EXTRA_DIST = mkfiles README +--- a/src/switch/tcp/Makefile.in ++++ b/src/switch/tcp/Makefile.in +@@ -200,7 +200,7 @@ sw_tcp_SOURCES = tcpsw.c + sw_tcp_XTRAS = $(top_builddir)/src/switch/libsw.a \ + $(top_builddir)/src/lib/libatm.la + +-sw_tcp_LDADD = $(sw_tcp_XTRAS) -lfl ++sw_tcp_LDADD = $(sw_tcp_XTRAS) + sw_tcp_DEPENDENCIES = $(sw_tcp_XTRAS) + EXTRA_DIST = mkfiles README + all: all-am +--- a/src/switch/tcp/tcpsw.c ++++ b/src/switch/tcp/tcpsw.c +@@ -35,6 +35,10 @@ + #define MAX_PACKET (ATM_MAX_AAL5_PDU+sizeof(struct atmtcp_hdr)) + #define BUFFER_SIZE (MAX_PACKET*2) + ++int yywrap(void) ++{ ++ return 1; ++} + + typedef struct _table { + struct _link *out; /* output port */ +--- a/src/test/Makefile.am ++++ b/src/test/Makefile.am +@@ -20,7 +20,7 @@ br_SOURCES = br.c + bw_SOURCES = bw.c + isp_SOURCES = isp.c isp.h ispl_y.y ispl_l.l + isp_XTRAS = $(LDADD) +-isp_LDADD = $(isp_XTRAS) -lfl ++isp_LDADD = $(isp_XTRAS) + isp_DEPENDENCIES = $(isp_XTRAS) + window_SOURCES = window.c + +--- a/src/test/Makefile.in ++++ b/src/test/Makefile.in +@@ -283,7 +283,7 @@ br_SOURCES = br.c + bw_SOURCES = bw.c + isp_SOURCES = isp.c isp.h ispl_y.y ispl_l.l + isp_XTRAS = $(LDADD) +-isp_LDADD = $(isp_XTRAS) -lfl ++isp_LDADD = $(isp_XTRAS) + isp_DEPENDENCIES = $(isp_XTRAS) + window_SOURCES = window.c + CLEANFILES = errnos.inc +--- a/src/test/ispl_l.l ++++ b/src/test/ispl_l.l +@@ -18,6 +18,11 @@ + #include "ispl_y.h" + + ++int yywrap(void) ++{ ++ return 1; ++} ++ + static int lineno = 1; + + %} +--- a/src/qgen/ql_l.l ++++ b/src/qgen/ql_l.l +@@ -11,6 +11,11 @@ + #include "ql_y.h" + + ++int yywrap(void) ++{ ++ return 1; ++} ++ + typedef struct _tree { + struct _tree *left,*right; + const char str[0]; +--- a/src/sigd/cfg_l.l ++++ b/src/sigd/cfg_l.l +@@ -16,6 +16,10 @@ + + #include "cfg_y.h" + ++int yywrap(void) ++{ ++ return 1; ++} + + static int lineno = 1; + static int token; /* f@#%ing flex doesn't grok return after BEGIN */ diff --git a/package/network/utils/linux-atm/patches/300-objcopy_path.patch b/package/network/utils/linux-atm/patches/300-objcopy_path.patch new file mode 100644 index 0000000000..4f11516b2f --- /dev/null +++ b/package/network/utils/linux-atm/patches/300-objcopy_path.patch @@ -0,0 +1,40 @@ +--- a/src/extra/Makefile.am ++++ b/src/extra/Makefile.am +@@ -7,6 +7,8 @@ EXTRA_DIST = linux-atm.spec.in \ + BUILT_SOURCES = pca200e.bin pca200e_ecd.bin2 sba200e_ecd.bin2 + CLEANFILES = pca200e.bin pca200e_ecd.bin2 sba200e_ecd.bin2 + ++OBJCOPY = objcopy ++ + install-exec-hook: + $(MKDIR_P) $(DESTDIR)/lib/firmware + $(INSTALL_DATA) $(srcdir)/pca200e.bin $(DESTDIR)/lib/firmware +@@ -14,7 +16,7 @@ install-exec-hook: + $(INSTALL_DATA) $(srcdir)/sba200e_ecd.bin2 $(DESTDIR)/lib/firmware + + %.bin %.bin2: %.data +- objcopy -Iihex $< -Obinary $@.gz ++ $(OBJCOPY) -Iihex $< -Obinary $@.gz + gzip -n -df $@.gz + + +--- a/src/extra/Makefile.in ++++ b/src/extra/Makefile.in +@@ -187,6 +187,8 @@ CLEANFILES = pca200e.bin pca200e_ecd.bin + all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + ++OBJCOPY = objcopy ++ + .SUFFIXES: + $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ +@@ -385,7 +387,7 @@ install-exec-hook: + $(INSTALL_DATA) $(srcdir)/sba200e_ecd.bin2 $(DESTDIR)/lib/firmware + + %.bin %.bin2: %.data +- objcopy -Iihex $< -Obinary $@.gz ++ $(OBJCOPY) -Iihex $< -Obinary $@.gz + gzip -n -df $@.gz + + # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/package/network/utils/linux-atm/patches/400-portability_fixes.patch b/package/network/utils/linux-atm/patches/400-portability_fixes.patch new file mode 100644 index 0000000000..462f57c3f4 --- /dev/null +++ b/package/network/utils/linux-atm/patches/400-portability_fixes.patch @@ -0,0 +1,60 @@ +diff -urN linux-atm-2.5.2/src/ilmid/io.c linux-atm-2.5.2.new/src/ilmid/io.c +--- linux-atm-2.5.2/src/ilmid/io.c 2008-01-01 01:14:50.000000000 +0100 ++++ linux-atm-2.5.2.new/src/ilmid/io.c 2012-11-23 17:32:18.149268039 +0100 +@@ -48,6 +48,14 @@ + be manually configured (after ilmid has + registered the "official" address) - HACK */ + ++#ifndef SUN_LEN ++# include <string.h> /* For prototype of `strlen'. */ ++ ++/* Evaluate to actual length of the `sockaddr_un' structure. */ ++# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \ ++ + strlen ((ptr)->sun_path)) ++#endif ++ + extern SysGroup *remsys; + extern State ilmi_state; + static short atm_itf = -1; /* bad value */ +diff -urN linux-atm-2.5.2/src/mpoad/io.c linux-atm-2.5.2.new/src/mpoad/io.c +--- linux-atm-2.5.2/src/mpoad/io.c 2008-01-01 01:14:51.000000000 +0100 ++++ linux-atm-2.5.2.new/src/mpoad/io.c 2012-11-23 17:34:17.745271101 +0100 +@@ -10,14 +10,7 @@ + #include <errno.h> + #include <sys/ioctl.h> + #include <sys/param.h> /* for OPEN_MAX */ +-#if __GLIBC__ >= 2 + #include <sys/poll.h> +-#else /* ugly hack to make it compile on RH 4.2 - WA */ +-#include <syscall.h> +-#include <linux/poll.h> +-#define SYS_poll 168 +-_syscall3(int,poll,struct pollfd *,ufds,unsigned int,nfds,int,timeout); +-#endif + #include <atm.h> + #include <linux/types.h> + #include <linux/atmioc.h> +diff -urN linux-atm-2.5.2/src/sigd/atmsigd.c linux-atm-2.5.2.new/src/sigd/atmsigd.c +--- linux-atm-2.5.2/src/sigd/atmsigd.c 2008-01-01 01:14:52.000000000 +0100 ++++ linux-atm-2.5.2.new/src/sigd/atmsigd.c 2012-11-23 17:30:38.689265492 +0100 +@@ -517,7 +517,7 @@ + exit(0); + } + } +- (void) on_exit(trace_on_exit,NULL); ++ (void) atexit(trace_on_exit); + poll_loop(); + close_all(); + for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal); +diff -urN linux-atm-2.5.2/src/test/align.c linux-atm-2.5.2.new/src/test/align.c +--- linux-atm-2.5.2/src/test/align.c 2001-10-10 00:33:08.000000000 +0200 ++++ linux-atm-2.5.2.new/src/test/align.c 2012-11-23 17:25:15.077257206 +0100 +@@ -24,7 +24,7 @@ + #include <signal.h> + #include <sys/types.h> + #include <sys/socket.h> +-#include <sys/errno.h> ++#include <errno.h> + #include <atm.h> + + |