packages: clean up the package folder
[openwrt/svn-archive/archive.git] / package / network / utils / linux-atm / patches / 400-portability_fixes.patch
1 diff -urN linux-atm-2.5.2/src/ilmid/io.c linux-atm-2.5.2.new/src/ilmid/io.c
2 --- linux-atm-2.5.2/src/ilmid/io.c 2008-01-01 01:14:50.000000000 +0100
3 +++ linux-atm-2.5.2.new/src/ilmid/io.c 2012-11-23 17:32:18.149268039 +0100
4 @@ -48,6 +48,14 @@
5 be manually configured (after ilmid has
6 registered the "official" address) - HACK */
7
8 +#ifndef SUN_LEN
9 +# include <string.h> /* For prototype of `strlen'. */
10 +
11 +/* Evaluate to actual length of the `sockaddr_un' structure. */
12 +# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
13 + + strlen ((ptr)->sun_path))
14 +#endif
15 +
16 extern SysGroup *remsys;
17 extern State ilmi_state;
18 static short atm_itf = -1; /* bad value */
19 diff -urN linux-atm-2.5.2/src/mpoad/io.c linux-atm-2.5.2.new/src/mpoad/io.c
20 --- linux-atm-2.5.2/src/mpoad/io.c 2008-01-01 01:14:51.000000000 +0100
21 +++ linux-atm-2.5.2.new/src/mpoad/io.c 2012-11-23 17:34:17.745271101 +0100
22 @@ -10,14 +10,7 @@
23 #include <errno.h>
24 #include <sys/ioctl.h>
25 #include <sys/param.h> /* for OPEN_MAX */
26 -#if __GLIBC__ >= 2
27 #include <sys/poll.h>
28 -#else /* ugly hack to make it compile on RH 4.2 - WA */
29 -#include <syscall.h>
30 -#include <linux/poll.h>
31 -#define SYS_poll 168
32 -_syscall3(int,poll,struct pollfd *,ufds,unsigned int,nfds,int,timeout);
33 -#endif
34 #include <atm.h>
35 #include <linux/types.h>
36 #include <linux/atmioc.h>
37 diff -urN linux-atm-2.5.2/src/sigd/atmsigd.c linux-atm-2.5.2.new/src/sigd/atmsigd.c
38 --- linux-atm-2.5.2/src/sigd/atmsigd.c 2008-01-01 01:14:52.000000000 +0100
39 +++ linux-atm-2.5.2.new/src/sigd/atmsigd.c 2012-11-23 17:30:38.689265492 +0100
40 @@ -517,7 +517,7 @@
41 exit(0);
42 }
43 }
44 - (void) on_exit(trace_on_exit,NULL);
45 + (void) atexit(trace_on_exit);
46 poll_loop();
47 close_all();
48 for (sig = entities; sig; sig = sig->next) stop_saal(&sig->saal);
49 diff -urN linux-atm-2.5.2/src/test/align.c linux-atm-2.5.2.new/src/test/align.c
50 --- linux-atm-2.5.2/src/test/align.c 2001-10-10 00:33:08.000000000 +0200
51 +++ linux-atm-2.5.2.new/src/test/align.c 2012-11-23 17:25:15.077257206 +0100
52 @@ -24,7 +24,7 @@
53 #include <signal.h>
54 #include <sys/types.h>
55 #include <sys/socket.h>
56 -#include <sys/errno.h>
57 +#include <errno.h>
58 #include <atm.h>
59
60